Answers for "ssh git asking for username"

2

how to stop git asking for username and password

// For permanently stop git from asking credentials
$ git config credential.helper store
$ git push https://github.com/repo.git

Username for 'https://github.com': <USERNAME>
Password for 'https://[email protected]': <PASSWORD>

// User can also specify caching expire
$ git config --global credential.helper 'cache --timeout 7200'
// After enabling credential caching, it will be cached for 7200 seconds (2 hours).
Posted by: Guest on August-02-2021
0

Why github ask me username/password instead of SSH authentication?

/*
 * select Clone or Download and Use SSH
 * You will get a URL for the SSH protocol in the form [email protected]:<user>/<repo>.git
 * Then run the following command in your working tree to tell Git to use this URL instead of the current one
 */ 
git remote set-url origin [email protected]:<user>/<repo>.git
Posted by: Guest on September-15-2021

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language