I'm writing a Windows Powershell script to set up a new development environment. One of the steps uses git clone
in order to pull our project from Github. I'm using the following command:
git clone git@github.com:Account/Project.git C:\Project
This works, but git
will prompt the user for their password. Unfortunately, this line of code executes in the middle of the Powershell script, and users don't realize that it's expecting their input because everything else is automated up until this point.
I'd like to prompt the user for their password when the script first executes, but how do I pass it to git clone
? It doesn't look like it can accept a password as one of its parameters.