Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
shubham-deshmukh opened this issue May 24, 2023 · 5 comments
Open

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

shubham-deshmukh opened this issue May 24, 2023 · 5 comments
Labels
help wanted Extra attention is needed

Comments

@shubham-deshmukh
Copy link
Contributor

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

@shubham-deshmukh
Copy link
Contributor Author

Please @sahil-sagwekar2652 verify and review it from your end. In case it is a valid bug, I would like to work on this task. Thank you.

@shubham-deshmukh shubham-deshmukh changed the title Create repo automation failer : Fix the create_repo.py Create repo automation failure : Fix the create_repo.py May 24, 2023
@tanish111
Copy link

Hi I a contributor at GSSOC and want to fix this issue please assign it to me

@sahil-sagwekar2652
Copy link
Owner

Great work pointing out his bug @shubham-deshmukh . I will try to reproduce it locally and then get back to you. @tanish111 If you are up for it you can also try to reproduce the above mentioned bug on your system.

@sahil-sagwekar2652 sahil-sagwekar2652 added the help wanted Extra attention is needed label May 29, 2023
@sahil-sagwekar2652
Copy link
Owner

@c0sm0void can you please take a loot at this issue?

@shubham-deshmukh
Copy link
Contributor Author

@sahil-sagwekar2652 @c0sm0void any updates on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants