0

I've been working on an update to a server that requires a private GitHub repository. I can download the repo on my machine, because I'm able to enter a password when prompted. When I try to do this with my server, which is running on an Amazon EC2 instance, I don't have these prompts, so the module from the GitHub repository is not installed. Is there a way for me to provide the username and password in the installing file that I'm using for pip, so I can have the private repo module install successfully?

I'm using the -e git+<url>#egg=<name> in my requirements.txt

Cᴏʀʏ
  • 105,112
  • 20
  • 162
  • 194
NumberOneRobot
  • 1,691
  • 6
  • 17
  • 23
  • Maybe this helps? http://stackoverflow.com/questions/5343068/is-there-a-way-to-skip-password-typing-when-using-https-github – metaperture Jul 28 '14 at 22:27

1 Answers1

1

You can use SSH links instead of HTTPS links, like git@github.com:username/projectname.git instead of https://github.com/username/projectname.git, and use authentication keys instead of a password.

Step by step, you have to:

  1. Change URL in requirements.txt to git@....
  2. Create a key pair for your deployment machine and store it in ~/.ssh/ directory.
  3. Add the key to you Github account.

Read the GitHub help pages for more detailed instructions.

Bartosz Marcinkowski
  • 6,651
  • 4
  • 39
  • 69