password issue in cloning git repository from bitbucket

[亡魂溺海] 提交于 2020-01-02 03:42:07

问题


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:

  1. pbcopy < ~/.ssh/id_rsa.pub
  2. go to account/ssh keys to add this key
  3. use ssh protocol not https

For PC

http://confluence.atlassian.com/display/BITBUCKET/Set+up+SSH+for+Git

In short:

  1. cat /home/USER/.ssh/id_rsa.pub > key.txt
  2. same as Mac


来源:https://stackoverflow.com/questions/10107611/password-issue-in-cloning-git-repository-from-bitbucket

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!