V
V
Vova2017-03-20 10:12:08
git
Vova, 2017-03-20 10:12:08

Where does git "client" store keys?

Hello.
I'm trying to figure out the authorization in git now.
Raised a virtual machine (bare windows 7, just installed, nothing), installed git (from here: https://git-scm.com/download/win)
I launch git-bash, I launch ssh-agent from it (via eval $( ssh-agent -s)), I add a private key (ssh-add ~/.ssh/id_rsa). (I, of course, put the key in advance on the server (in the required format) and in the user's .ssh folder)
ssh-add -l honestly shows that the key is there.
I check: git clone [email protected]_repository... -b branch dir - works!!!,
files are pulled from the repository and dropped to the disk.
Then I try to bang the key: I
try to do ssh-add -D (I check if clone in git-bash works)
I restart git-bash (clone works in git-bash)
manually kill processes ssh.exe, ssh-agent.exe (clone works in git-bash)
Why??!! Where does git-bash defer keys, and why does clone work afterwards no matter what I do?
Actually, if initially the keys are in the .ssh folder, then after ssh-add they are copied somewhere (apparently both to disk and to memory)?
(The question did not grow out of nowhere, I tried to connect two repositories and could not. I want to at least understand where the keys are stored).

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Mikhail Konyukhov, 2017-03-20
@JustMoose

Why??!!

1. Because the default key from ~/.ssh/id_rsa is used (it is not even necessary to do it with ssh-add)
2. he uses a regular ssh client from the OS, in your case from the git-bash distribution. The standard ssh client uses the ~/.ssh/id_rsa key by default, as well as keys from the agent if any

T
TyzhSysAdmin, 2017-03-20
@POS_troi

C:\Users\UserName\.ssh

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question