ezbz / gitlabber

Gitlabber - clones or pulls entire groups tree from gitlab
MIT License
483 stars 80 forks source link

How to specify ssh key to be used? #42

Closed Rigel772 closed 3 years ago

Rigel772 commented 3 years ago

I have multiple Gitlab accounts - cannot use the same ssh key for all so I have multiple keys in my .ssh folder... I dont need to all accounts to be cloned at once, can do it one by one but how to specify which key should be used? Thanks, great project!

ezbz commented 3 years ago

Gitlabber uses GitPython, it could be theoretically achieved with GitPython as described here but this not something I think should be implemented for gitlabber.

I suggest you clone with HTTP as the method and provide the token for each gitlab account via the CLI.

If you have to rely on SSH you need to do some SSH trickery between the commands to achieve this.

Rigel772 commented 3 years ago

Ok, thanks

On Sun, 21 Feb 2021, 15:24 Erez Mazor, notifications@github.com wrote:

Gitlabber uses GitPython https://gitpython.readthedocs.io/en/stable/, it could be theoretically achieved with GitPython as described here https://medium.com/@tzuni_eh/git-commit-with-gitpython-and-ssh-key-926cad91ca89 but this not something I think should be implemented for gitlabber.

I suggest you clone with HTTP as the method and provide the token for each gitlab account via the CLI.

If you have to rely on SSH you need to do some SSH trickery between the commands to achieve this.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ezbz/gitlabber/issues/42#issuecomment-782866074, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAM6D46UI733D3W2QOTOB7DTAEJTJANCNFSM4X4JGDBA .

ezbz commented 3 years ago

@Rigel772 can I close this?

Rigel772 commented 3 years ago

Sure, sorry, forgot.