Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Trying to install git on OSX: cannont exec 'git-credential-osxkeychain': Permission denied`

I'm attempting to install Git on my new MBP and am following the documentation @ https://help.github.com/articles/set-up-git.

I seem to have hit a snag at the point where it says : If you do not have the helper, you can download it and copy it to /usr/local/bin

I navigated to /usr/local/bin in terminal and did a sudo wget [link to osxkeychain]. When I try to do a git config --global credential.helper osxkeychain I get a fatal: cannont exec 'git-credential-osxkeychain': Permission denied.

What did I do wrong?

Thanks!

Tre

like image 695
tr3online Avatar asked Jun 03 '12 04:06

tr3online


2 Answers

Download the git-credential-osxkeychain file to your desktop(!).
Open the Terminal application.
Type in the following:

sudo cp  ~/Desktop/git-credential-osxkeychain /usr/local/bin/git-credential-osxkeychain  
sudo chmod 755 /usr/local/bin/git-credential-osxkeychain  
sudo git config --global credential.helper osxkeychain

Test it with:

sudo git credential-osxkeychain

See the sudo prefix? It seems to be required for the credential stuff... It should now output Usage: git credential-osxkeychain <get|store|erase>

like image 136
powtac Avatar answered Nov 18 '22 03:11

powtac


Make the downloaded file executable:

chmod 755 git-credential-osxkeychain
like image 13
nathancahill Avatar answered Nov 18 '22 05:11

nathancahill