Skip to content

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

Updated: at 02:12 PM

 

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.

https://confluence.atlassian.com/display/BITBUCKET/Set+up+SSH+for+Git

http://stackoverflow.com/questions/11918285/my-bashrc-file-not-executed-on-git-bash-startup-windows-7

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/id_rsa.pub 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:  git@bitbucket.org:pkellner99/win8storeagelessemail.git

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.

[core]
    repositoryformatversion = 0
    filemode = false
    bare = false
    logallrefupdates = true
    symlinks = false
    ignorecase = true
    hideDotFiles = dotGitOnly
[remote "origin"]
    fetch = +refs/heads/*:refs/remotes/origin/*
    url = git@bitbucket.org:pkellner99/win8storeagelessemail.git
[branch "master"]
    remote = origin
    merge = refs/heads/master
[gui]
    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)

Check out the ORM (Object Relational Mapper) PRISMA. The database access method I use in all my projects