简体   繁体   中英

password issue in cloning git repository from bitbucket

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'?

I found an answer in this site:

https://confluence.atlassian.com/bitbucket/set-up-an-ssh-key-728138079.html

For mac

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

In short:

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

For Linux

In short:

  1. cat ~/.ssh/id_rsa.pub | xclip -sel clip
  2. same as Mac

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM