问题
I have bitbucket git repository. I tried to clone it from my PC, but I cannot give password.
git clone https://id@bitbucket.org/id/SOMEGITPROJ.git
Cloning into SOMEGITPROJ...
Password:
As I have this error.
'PASSWORD' is not recognized as an internal or external command,
operable program or batch file.
How to solve this issue? Is there any way to give the password in the same command line of 'git clone command'?
回答1:
I found an answer in this site.
For mac
http://confluence.atlassian.com/pages/viewpage.action?pageId=270827678
In short:
- pbcopy < ~/.ssh/id_rsa.pub
- go to account/ssh keys to add this key
- use ssh protocol not https
For PC
http://confluence.atlassian.com/display/BITBUCKET/Set+up+SSH+for+Git
In short:
- cat /home/USER/.ssh/id_rsa.pub > key.txt
- same as Mac
来源:https://stackoverflow.com/questions/10107611/password-issue-in-cloning-git-repository-from-bitbucket