I'm using Git on Windows with LDAP. No issue so far.

When I'm cloning my remote repository I call:

git clone http://user@host.com/name/.git and I got a prompt for password

This is working. But now I will run a script and clone without password prompt.

How can I do this?

link|improve this question
feedback

1 Answer

up vote 0 down vote accepted

Put it in the URL.

http://user:password@host.com/name/.git
link|improve this answer
This is what I tried, but this was not working. SYSTEM answers: sh.exe: event not found – Klaus Meier May 16 '11 at 6:51
That's because your shell is consuming the ! in your password. Escape or encode it. – Ignacio Vazquez-Abrams May 16 '11 at 6:55
is there an option to store the password in a file like on Star Team stcmd.exe co -epwdfile "pw.txt" -p "$user:@host" – Klaus Meier May 16 '11 at 7:17
You can set the core.askpass option to a program that will output the password on stdout, but nothing built-in. – Ignacio Vazquez-Abrams May 16 '11 at 7:20
I found an escape character for @ -> %40 for example but non for ! – Klaus Meier May 16 '11 at 7:42
show 2 more comments
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.