开发者

How to clone GIT repository with private key

开发者 https://www.devze.com 2023-01-28 00:57 出处:网络
I am trying create an application which will clone the GIT repository to the computer. My question is how to clone the sec开发者_如何学Goured repository if the SSH keys are not in the default place.

I am trying create an application which will clone the GIT repository to the computer. My question is how to clone the sec开发者_如何学Goured repository if the SSH keys are not in the default place.

I want to let people to upload keys and then with those keys to connect and clone the repository.

So to conclude: I do not want GIT to look for key on default places, I want to 'give' it the path to the key file, and then put it in command (along with passphrase if there is any) somehow and get cloned repository.

Thank you very much in advance!


It's not git who is looking, its SSH. You need to specify the keys in the .ssh/authorized_keys file, that is the public key btw. The private key will be stored on the users machine.

0

精彩评论

暂无评论...
验证码 换一张
取 消