Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
Duplicate on StackOverflow has more substantial answers. –  Dan Dascalescu Sep 18 '14 at 23:14

1 Answer 1

up vote 3 down vote accepted

Put it in the URL.

share|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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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