Reputation: 799
When executing 'git credential-osxkeychain' in MacOS, it shows the option 'store' and I guess it can be used to add the credentials.
I didn't find any documentation about the syntax required to add credentials using the command 'git credential-osxkeychain store', anyone knows how to do it?
Please notice that I do know how to do it using the MacOS app 'Keychain Access', I'd like to know how to do it using the command line
Upvotes: 11
Views: 9364
Reputation: 94511
git credential-osxkeychain store
reads protocol/host/username/password from stdin separated by newlines, so feed them something like this:
echo "\
protocol=https
host=github.com
username=$NAME
password=$PASSWD" | git credential-osxkeychain store
All 4 parameters are required.
Upvotes: 27