Requesting a password

16 views
Skip to first unread message

Matt Allen

unread,
Jul 28, 2011, 10:04:51 PM7/28/11
to babushka_app
Hi All;

Am quite new to this babushka thing, but am really enjoying it so far.

I have to clone some code out of a SVN repo and am using git svn. Dep
looks like this:

met? {
File.exists? "~/path_to_app/.git"
}
meet {
shell "git svn clone https://XXX.jira.com/svn/REPO/trunk/app
path_to_app"
}

It seems to be hanging on the meet step. I figure it's trying to ask
for a username and password for the SVN repo because that I havent
given it one. My question is, what is the correct way of doing this
in babushka?

Thanks,
Matta

Ben Hoskings

unread,
Jul 29, 2011, 1:59:40 AM7/29/11
to babush...@googlegroups.com
You can pass the user to `git svn` in a couple of ways, depending on the URL scheme:

git svn clone --username=matta https://XXX.jira.com/svn/REPO/trunk/app
git svn clone svn+ssh://ma...@XXX.jira.com/svn/REPO/trunk/app

You can also pass input to #shell, and it will be provided to the command on STDIN. This might not work at a password prompt, because some open a direct channel to the keyboard device and won't except STDIN input. But, it's worth a try:

shell "git svn clone https://XXX.jira.com/svn/REPO/trunk/app path_to_app", input: "password\n"

—Ben

> --
> To post, email babush...@googlegroups.com
> To unsubscribe, email babushka_app...@googlegroups.com
> ~
> http://babushka.me
> http://github.com/benhoskings/babushka
> http://groups.google.com/group/babushka_app

Matt Allen

unread,
Jul 29, 2011, 2:01:02 AM7/29/11
to babush...@googlegroups.com
Thanks Ben!

Will give it a whirl.

Matta

Reply all
Reply to author
Forward
0 new messages