I'm using git on a new git linux computer. When I do git push
, it me asks for user/password.
I've setup git properly, and in fact cloning the repo from github into a new folder works perfectly (using my public key, not the readonly copy). When I try to push from a previous clone I made to the same repo I get prompted for a user/pass.
Of course sshing into [email protected] works, and I made sure my public key is configured in github. Any ideas how to continue debugging?
If Git prompts you for a username and password every time you try to interact with GitHub, you're probably using the HTTPS clone URL for your repository. Using an HTTPS remote URL has some advantages compared with using SSH.
To prevent Git from asking for your username and password, you can enter the login credentials in the URL as shown. The main drawback of this method that your username and password will be saved in the command in the Shell history file.
If git push origin master not working , all you need to do is edit that file with your favourite editor and change the URL = setting to your new location. Assuming the new repository is correctly set up and you have your URL right, you'll easily be able to push and pull to and from your new remote location.
Copy public key from specified file. Go to your GitHub profile => Settings => SSH and GPG keys => New SSH key => Paste your SSH key there => Save.
this occurs because you did
git clone https://github.com/username/repo
instead of
git clone [email protected]:username/repo.git
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With