Tuesday, 23 December 2014

push to github by git command needs username and password every time

When I use my github account to push code to github I need input my username and password every time.

My solution is :

1. follow this to create a ssh key:
  https://help.github.com/articles/generating-ssh-keys/
2. follow this to put my password into my keychain of mac:
  https://help.github.com/articles/caching-your-github-password-in-git/


you may need change your user name and email by:


git config --global user.name xxx@xxx.com

git config --global user.email xxx@xxx.com


and user this to print your email and name:

 git config user.name

 git config user.email

No comments:

Post a comment