Git clone with user and password

git

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?

Best Answer

Put it in the URL.

http://user:password@host.com/name/.git