Re: How do you save passwords for Git/GitHub?
On Thu, Jul 21, 2011 at 1:06 PM, Jason Hsu <email@example.com> wrote:
> I have a script that uses "git clone" multiple times to download all of the repositories I need for my project Swift Linux. (Each major task has its own repository.) The code is at https://github.com/swiftlinux/1-build/blob/master/get_reps_diet.sh .
> However, I'm asked for my password EVERY TIME the script tries to download a repository. Is there a way to save my password (temporarily) so that I don't have to enter it 20 times? All I need here is a way to download multiple repositories while only entering my password ONCE. Is that too much to ask?
Depends on your client setup. Most of them rely on setting up an
"ssh-agent" into which you load your SSH keys, unlocked. This is
especially with Subversion as a source control system, since you're
always talking to a central server to get updates or record changes,
but it's very helpful for the kind of git access you're describing.
For ordinay command line access on machines where you trust the local
environment, such as a laptop or dedicated development machine, I
personally like "keychain" to provide access to unlocked SSH keys.
It's friendly, flexible, and works well. There are more complex
"wallet" tools for Gnome and KDE enviornments, but they're more
awkward to use without an X session running.