I have created and successfully implemented a Git project on the Codaset website. I am using SSH to communicate between my Codaset and my local repository. When I do a push from Git Bash, Git Bash asks me for my user name credentials. Although, Git Bash performs the push successfully, it is tedious to having to enter my user credentials every time I perform a push.
I have checked out many blogs and suggestions to fix this problem, but to no avail. Also, I have tried to use PuTTY. My questions are:
You can avoid being prompted for your password by configuring Git to cache your credentials for you. Once you've configured credential caching, Git automatically uses your cached personal access token when you pull or push a repository using HTTPS.
Just go to https://github.com/settings/tokens to create it. You need to give the repo scope to the new token. Then you can use https://<username>:<token>@github.com/myrepo to push. Note: That token is dangerous, it allows full control to your repos just like your password.
To update your credentials, go to Control Panel -> Credential Manager -> Generic Credentials. Find the credentials related to your git account and edit them to use the updated passwords as per the image below: I hope this helps with your Git issues.
In your terminal, type:
git config -l
This will bring up your repository's configuration information. Look at the row remote.origin.url
. From what you're describing it should be: https://github.com/Username/project.git
.
That means it's using the HTTP protocol instead of SSH! I just had this problem too :) There is an easy fix, though!
Just execute this in the terminal:
git config remote.origin.url [email protected]:Username/project.git
It should take care of things!
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