从bitbucket克隆git存储库中的密码问题

pro*_*eek 6 git repository bitbucket

我有bitbucket git存储库.我试图从我的电脑克隆它,但我不能给密码.

git clone https://id@bitbucket.org/id/SOMEGITPROJ.git
Cloning into SOMEGITPROJ...
Password:
Run Code Online (Sandbox Code Playgroud)

因为我有这个错误.

'PASSWORD' is not recognized as an internal or external command,
operable program or batch file.
Run Code Online (Sandbox Code Playgroud)

如何解决这个问题?有没有办法在'git clone命令'的同一命令行中输入密码?

pro*_*eek 6

我在这个网站找到了答案.

对于mac

http://confluence.atlassian.com/pages/viewpage.action?pageId=270827678

简而言之:

  1. pbcopy <〜/ .ssh/id_rsa.pub
  2. 转到帐户/ ssh键添加此密钥
  3. 使用ssh协议而不是https

对于PC

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

简而言之:

  1. cat /home/USER/.ssh/id_rsa.pub> key.txt
  2. 和Mac一样