How to save your git password in the Mac OSX keychain

Are you tired of constantly having to enter your Git password all the time? Here’s how to make life much easier for you by saving the git password in the Mac OSX keychain.

In order to not having enter your git based password every time you perform a git operation, here’s how you can store the git password in the Mac OSX keychain:

Check if you have the credential-osxkeychain helper already installed:

git credential-osxkeychain

If not, the download and install it:

curl http://github-media-downloads.s3.amazonaws.com/osx/git-credential-osxkeychain -o git-credential-osxkeychain
sudo mv git-credential-osxkeychain /usr/local/bin
sudo chmod u+x /usr/local/bin/git-credential-osxkeychain

And make git use the helper:

git config --global credential.helper osxkeychain

 

 

How to create a new Eclipse project and push it to a new Git enabled bitbucket repository

 

Pre-requisites:

Step 1: Setup Git

Download msysgit and install it.

Setup Git  to use the SSH protocol. Using SSH is much better than the HTTPS access, since you don’t have to enter your password every now and then.

Step 2: Create a new repository in bitbucket

image

image

Step 3: Create a new project in Eclipse

imageimageimage

Step 4: push the new project up to the bitbucket repository.

Open a Git Bash command prompt. Change the working directory to the location of the new project:

 

cd Projects/workspace-test/AndroidTest/

image

Initilize git:

$git init

image

$git add *

image

$git commit –m “Initial commit”

image

$git remote add origin git@bitbucket.org:InsomniacGeek/androidtest.git

image

$git push origin master

image

 

Step 5: Verify that the repository is updated:

image