Sign in when pushing a Git commit


#1

New atom user here. This is a simple question, but I could’t find it in the form or FAQs.

When pushing changes to a github repo, like so:

I’m always asked to sign in to my github account.

Is there a way to avoid this (stay signed in)?


#2

Sign in information is stored in a file called .gitconfig in your user folder. If you set up git from the command line, it will store that information automatically as soon as you push and authenticate yourself.

The format for the .gitconfig file is as follows. If you’re on Windows, you might have to create the file via Atom or the command line, because Explorer doesn’t allow setting filenames to start with a dot.

[user]
	email = myself@gmail.com
	name = BestGitHubberEver

#3

Thanks! I’m on mac, and it turns out, I didn’t have git hooked up to my osx keychain.

git credential -osxkeychain

did the trick