prosseek
prosseek

Reputation: 191169

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://[email protected]/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'?

Upvotes: 7

Views: 9500

Answers (1)

prosseek
prosseek

Reputation: 191169

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

Upvotes: 7

Related Questions