Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 378
prosseek Avatar asked Apr 11 '12 14:04

prosseek


1 Answers

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
like image 152
prosseek Avatar answered Oct 04 '22 03:10

prosseek