Git: Clone / Pull without password

Hi, my repositories are in Bitbucket,  and i’m using ssh to git clone / git pull without asking the password.

My environment is Ubuntu.

Here are my steps:

  1. $ su – your_username
  2. $ ssh-keygen
    (then Enter Enter Enter)
    $ ps -e | grep [s]sh-agent
    $ ssh-agent /bin/bash
    $ ssh-add ~/.ssh/id_rsa
    $ ssh-add -l
    $ cat ~/.ssh/ (copy key and paste to repo Bitbucket – Settings – Deployment Keys)
  3. In Bitbucket, click Clone, then from the dropdown choose SSH, copy clone the url
  4. Then $ cd /your/project_folder
  5. Then paste the clone url
    1. eg: git clone .
    2. Notice the . (dot) will extract the file in the project folder – will not create new folder ‘yiiproject’.
  6. Ok DONE.

So next time git won’t ask password when you git pull any update from your project repositories.



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s