tags:

views:

123

answers:

2

I removed my .gitconfig by accident. I added new identies by

git add [file]
git remote ... [identity addition]

I am surprised when Git did not make a .gitconfig file which contain my secret tokens to my Home.

Git must have put the secret tokens elsewhere. However, I have not been able to find the location.

The reason for that the data is not at .gitconfig may that I have .gitconfig at my .gitignore -file.

Where does Git save the user's secret tokens for github when they are not at Home's .gitconfig?

+2  A: 

GitHub uses SSH authentication so your tokens will be stored wherever your SSH client stores them. On Linux it would be under ~/.ssh.


I think you might mean where does git store the configuration information about your remotes? Usually it's not in your ~/.gitconfig. Usually it's in the "config" file under the ".git" directory in the root of your project.

Talljoe
@Talljoe: I had some tokens at my .gitconfig for github before the file removal accident. --- Are these tokens same as what SSH client stares?
Masi
I opened the following question because I want to know the exact details: http://stackoverflow.com/questions/1081194/how-does-git-decide-where-to-save-secret-tokens-exactly
Masi
A: 

You have to add your GitHub tokens yourself. The instructions are on GitHub

Alec the Geek