Ruby + git +ssh keys

R

Roman Kononov

Problem: i need to verify git repo properties (ssh key,repo url) in ruby

Solutions:
1) write ssh key into ~/.ssh/id_rsa file and execute "git clone" command
with repo url property - easiest way
-cause race conditions when multiple users trying to check theirs repos.
2) write key into any file and link server and key in ssh.config file
than execute git in ordinal way
-ssh.config file has limited lenght(255 records)
3) add key via ssh-agent and execute git in ordinal way
-ruby can't handle passphrase request (if ssh key protected with
passphrase)

Resume: so i need universal solution (like ssh -i) that is easy to
use,clean,will work in multithread environment and all errors can be
handled via basic IO (exec and so on)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,189
Members
46,735
Latest member
HikmatRamazanov

Latest Threads

Top