Why this Ruby code doesn't work? It's supposed to clone a git repository from a remote server.
pipe = IO.popen( 'git clone [email protected]:/prj/Common/git/MyProject', "w+" )
pipe.puts 'mySecretPassword'
pipe.close_write
Thanks.
Why this Ruby code doesn't work? It's supposed to clone a git repository from a remote server.
pipe = IO.popen( 'git clone [email protected]:/prj/Common/git/MyProject', "w+" )
pipe.puts 'mySecretPassword'
pipe.close_write
Thanks.
I don't know why it's not working but if you want to work with Git repo in your Ruby app it's good idea to use one of Gems that provide API for Git (i.e. git).
I'd use a git wrapper for ruby such as this one. Makes everything simpler https://github.com/libgit2/rugged
pipe.puts