Use osx keychain with git
Asked Answered
C

3

4

I am trying to use osx keychain with git, but when i enter

sudo mv git-credential-osxkeychain /usr/local/bin

and then my password i get the error: mv: git-credential-osxkeychain: No such file or directory

My git installation is located in /usr/local/bin/git

I am using Mac OSX Mountain Lion.

Corabella answered 24/10, 2012 at 19:22 Comment(4)
Is git-credential-osxkeychain actually in the directory where you're executing the command?Laevogyrate
@moretension no, i am in wrong directory. How do i go to the right one? Thanks.Corabella
Using the cd command at the shell prompt before running the mv command, e.g., cd /Users/herrnilsson/Desktop. It sounds like you're unfamiliar with the command line, though. I'd recommend taking the time to go through a basic tutorial, like this one: barelystable.com/tutorials/terminal/Terminal_Tutorial/…Laevogyrate
Where is the git-credential-osxkeychain installed?? its frustrating that the installation instruction assumes that you know this already.Lunarian
N
4

I find one of the best tricks for cases like this is using locate, an insanely powerful command. In this example, locate git-credential-osxkeychain results in a few paths showing you exactly where to look.

Plus, you can use other fun CLI stuff like piping locate results to grep to refine a search: locate git-credential-osxkeychain | grep /usr

Nippy answered 29/10, 2013 at 3:24 Comment(5)
Additional info: I went to use the command on a Macbook Pro 2012 OS 10.9.3 and it gave me a warning - WARNING: The locate database (/var/db/locate.database) does not exist. To create the database, run the following command... 1) I was hesitant to run it - bc did not want to affect the resources on the mac - the fact that it has to build the database was concerning. I ran the command in any case - 2) it does indicate it takes some time to build the database (thus use locate). 1st attempt to use locate was 10 secs after - did not work. Waited about 2 minutes - and it worked.Disraeli
+1 for the detailed and thoughtful comment. First of all, I totally identify with being irked at 'behind-the-scenes' operations; don't worry though! This is just an example of old unix software being slow and non-user-friendly. You may have seen a Spotlight popup along the liens of 'indexing... please wait'; this is the same thing, just hidden. locate has to re-find all your files, or find them in the first place, and it looks like it's doing nothing. Since I like the CLI so much, I keep my DB up to date by running the update in a 'launch' script every few hours.Nippy
For more info, I would suggest checking out this article. I should warn people that locate is actually really fragile and breaks easily. Most often this is from 'crud' that builds up from normal use (external/network/mounted drives contribute to this) and for many its just not worth using. I like hacking and exploring the unix underworld of my mac though, so wrangling with locate is a 'fun' thing for me. I rely on the find function of PathFinder app for my 'real' searching to be honest!Nippy
yep thanks - and same to you. your post was very helpful for me in that set up and more. cheersDisraeli
The easiest way to find files by their name on OS X remains using mdutil, the CLI front-end to Spotlight: mdfind -name foobar is the equivalent to locate foobar. Much faster and builtin in macOS.Satin
A
1

On my Mac OSX Mountain Lion machine, it's in /usr/local/git/bin/git-credential-osxkeychain

Agrigento answered 26/6, 2013 at 23:4 Comment(0)
K
0

for me works with cd usr/local/git/bin/ then mv git-credential-osxkeychain /usr/local/bin

Kiersten answered 6/2, 2014 at 17:45 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.