Skip to content

Create repo automation failure : Fix the create_repo.py #61

@shubham-deshmukh

Description

@shubham-deshmukh

Issue Description:
create_repo.py (python script) is not automated as mentioned in the readme.

Normally to connect a local repository to GitHub one has to go to the GitHub website, create a new respository and then add the new GitHub repo as a remote for your local repository. The create_repo script automates this process.

create_repo.py does ask for a prompt when linking the local repository with the remote repository. In this case, it defeats the purpose of automation.

Steps to Reproduce:
There might be various ways to reproduce the bug. I'm enlisting one of them.
Scenario (A):

  1. Step 1:

    • Remove the stored credentials from the Windows credential manager if present.

    image
    image

    • Run the create_repo script with valid git configuration, valid arguments and with valid token in the github_secrets.py

    image
    Note: Due to the VScode extension it invokes GUI prompts else as shown below.
    image

Thus, it is not automated as mentioned in the README.

The create_repo script automates this process.

Expected Behavior:
On create_repo execution, it should create a remote repository, create a local repository and link the local repository with the newly created remote repository without asking for a prompt. In linking the local repo with the remote repo it should use the credentials from github_secrets.py but not from the Windows credentials manager.

Current Behavior:
Current scripts work in the following scenarios.

  1. The user has to explicitly provide the credentials in the prompt or,
  2. It fetches the valid credentials from the Windows credentials manager.

Environment:

  • Device: Windows Laptop
  • Operating System: Windows 11
  • Software Version: git version 2.40.1.windows.1

Additional Information:

It is working fine for me, why?

In case it is working as expected then the following actions might be happening.

  1. Users are using the same token which is cached (stored in the Win credentials manager). Thus by default, it uses the cached credentials instead of github_secreats.py 's token for linking the repos.

It need not be the scenario in the real use case.

Labels:
Bug

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions