How to clone GIT repository with private key

I am trying create an application which will clone the GIT repository to the computer. My question is how to clone the secured 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!

Answers


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.


Need Your Help

Can't include a file in NASM

assembly nasm

I try to include a file into my boot.asm file using

issue with recordset navigation on website

php html sql navigation recordset

I am making a dynamic blog where it pulls posts from a SQL database and I tried to add some recordset navigation but it will not flip through the posts when I press 'next'.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.