S
S
Sultan2020-06-25 13:24:41
git
Sultan, 2020-06-25 13:24:41

How to push to github using ssh?

Good day everyone! The question is, I generated a separate pair of ssh keys for myself and placed them in the .ssh/GitHub/ folder. I uploaded the public key to GitHub, but it doesn’t work and I understand why, but I can’t find a solution. I know that you can safely fly into the server, even if the ssh key is not in the standard folder, ssh -iand indicate where the private key is located.
Tell me, is there a similar way, only for git?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
DevMan, 2020-06-25
@soltanoffsu

add key to ssh-agent.
use GIT_SSH_COMMAND.
use sshconfig.
I prefer the third option.

V
Vladimir, 2020-06-25
@Casufi

https://git-scm.com/docs/git-config#Documentation/...
You can specify a specific ssh command in the config for the repository and -i in it

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question