Using multiple ssh keys for networks?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
14 views
How to use multiple ssh keys for different projects and accounts on the same PC?

There are two account networks.
In the main account I work with some projects.
I created an account for other projects.
Now configure ssh for the second account.
I generated ssh added to your account networks.
When I try to clone the project:
Enter passphrase for key '/Users/mac-pc/.ssh/id_rsa': git@gitlab.com: Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.

Note: knocking on that path: '/Users/mac-pc/.ssh/id_rsa' though I have to knock to another file, say "id_rsa_second"
When you try
ssh -T [username]@gitlab.com [username]@gitlab.com: Permission denied (publickey).


All ssh keys are in the folder .ssh
by | 14 views

2 Answers

0 like 0 dislike
https://medium.freecodecamp.org/manage-multiple-gi...

this is for github, but the principle is the same.
by
0 like 0 dislike
ssh-i /Users/mac-pc/.ssh/id_rsa_second -T [username]@gitlab.com
Or you can do the mapping in ~/.ssh/config, if not I would like to hand every time.
by

Related questions

0 like 0 dislike
2 answers
asked Aug 2, 2019 by alexmirg
0 like 0 dislike
2 answers
0 like 0 dislike
2 answers
0 like 0 dislike
1 answer
0 like 0 dislike
2 answers
110,608 questions
257,186 answers
0 comments
27,923 users