2

How can I run 'git clone' from script so it won't prompt for my password?

Is there some way, like entering the password on the same line with git clone?

(I have my own git repository. Not github)

alexarsh
  • 5,123
  • 12
  • 42
  • 51
  • What protocol do you use to access your git repository? ssh? try using a ssh certificate. – ayckoster Jun 29 '11 at 11:23
  • I use ssh. The whole idea that I write deployment script, so it would be great if I could do it from one-line command or something similar. – alexarsh Jun 29 '11 at 11:29

1 Answers1

1

This is about configuring passwordless ssh access to a server, if I understand correctly. Then you will only need to run your script on the machine and under the user that can access this server passwordlessly (possibly creating a specific limited ssh key for the use of this script).

You can google for passwordless ssh, look at this previous similar question, or look at how github advises its users to proceed, and adapt this to your server.

Community
  • 1
  • 1
Francois G
  • 11,957
  • 54
  • 59