Integrating BitBucket and GIT with ssh (no password required for push)

Posted by Peter Kellner on December 10, 2012 · 2 mins read


I’ve just gone through the process of integrating GIT with BitBucket so that when I sync I do not have to type in my username or password.  There are a couple locations I used as resources listed here. Much of what I did is exactly the same process but since it was a little of each I thought I’d blog it.

My environment is VMWare Fusion running on a MacBook. I’m using the released version of Windows 8-64.

1) Install Git

2) Run from the launch icon Git Bash

3) verify ssh installed (ssh –v)

4) in the bash shell prompt, run ssh-keygen (do put in a passphrase)

5)  copy and paste the text from the file /Users/peter/.ssh/ to the ssh section of your account information on bitbucket

6) paste the following code in to your .bashrc file:  

7) go to your bitbucket account information and grab the name of the repository in ssh speak. For me it is:

8) for me, it went into settings in tortoisegit and added the remote url in ssh speak, however I believe you can go into your /.git/config file and add to the remote origin section yourself the url of your remote repository (see below for what mine looks like.

    repositoryformatversion = 0
    filemode = false
    bare = false
    logallrefupdates = true
    symlinks = false
    ignorecase = true
    hideDotFiles = dotGitOnly
[remote "origin"]
    fetch = +refs/heads/*:refs/remotes/origin/*
    url =
[branch "master"]
    remote = origin
    merge = refs/heads/master
    wmstate = normal
    geometry = 887x427+182+182 171 192


That’s it for now.  Hope this helps (it will me when I forget how to do this and have to come back to these notes)