问题
I cloned repository from bitbucket but with my username like
git pull username@repository.blah
now it asks me for my bitbucket password every time. Now other developers want to pull too, but what should I do to make it easy for every developer.
回答1:
You should use SSH (not HTTPS):
git clone git@bitbucket.org:<your-usert>/<your-repo>.git
Create ssh key files using ssh-keygen
utility (all questions you may answer yes
). Add a public key content to User->Butbucket settings->SSH keys.
Now you can use any git command without enter your password
回答2:
You can use git config --global credential.helper manager
. So you need to input your username and password for the first time, then it will not ask for password next time.
来源:https://stackoverflow.com/questions/40630810/proper-way-to-avoid-asking-for-password-on-every-pull-on-production-server