Gitkraken with SSH in Gitlab

It was difficult for me to get auth to work with ssh keys (no need to request a user and pass each time). Configuration options / tutorials on this issue are limited / missing.

Here is the setup:

  • I believe that the repo from Gitlab was added using https, cannot find a way to change this, I don't know if this is important.

  • I am running Windows 10 with git - bash and have been following the Github tutorial to generate keys and add them to ssh-agent. The open gitlab has been added to my profile and you can successfully execute "ssh -T git @ gitlab.com".

  • Confused with the profile inside .gitkraken and changed the paths for the ssh keys: "useLocalAgent": true, "privateKey": "C: \ Users \ mendo \ .ssh \ id_rsa", "publicKey" :. "C: \ Users \ Mendo \ .ssh \ id_rsa.pub"
  • When I do pull, I am always prompted to insert the username and pass (although I started the ssh-agent process from git - bash).

I don’t know how I can solve this, so any help you guys can provide will be greatly appreciated. In addition, I can’t find any way in the application or on the Internet to remove / delete the repository from the application (I hope this is not obvious, and I’m fooling myself).

Thanks in advance for your help!

Best, Diogo

+4
source share
2 answers

If the repo was cloned using HTTPS, no changes to SSH settings will work. First you will need to change the URL of your remote. Fortunately, you can do this inside GitKraken.

GitKraken.

  • ( ). , , .

  • , Origin. "...", . "..."

  • "" " ". , , . URL. https://gitlab.com/user/repo.git git@gitlab.com:user/repo.git

, ssh GitKraken. Windows, Pagent ( PuTTY), " " GitKraken. Pagent , .

URL-, git - bash git remote set-url git@gitlab.com:user/repo.git .

PS: , , . .

+4

git bash:

git config --global user.name="yourUserName"
git config --global user.email="your@email.com"
0

Source: https://habr.com/ru/post/1654152/


All Articles