Last active
August 29, 2015 14:04
-
-
Save eentzel/af485bf308c25094f633 to your computer and use it in GitHub Desktop.
pip install over git when credentials are not installed in ~/.ssh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
touch deployer_key | |
chmod 600 deployer_key | |
cat > deployer_key <<EOF | |
-----BEGIN RSA PRIVATE KEY----- | |
something something something | |
-----END RSA PRIVATE KEY----- | |
EOF | |
cat > sshwrap <<'EOF' | |
#!/bin/sh -x | |
exec /usr/bin/ssh -i deployer_key "$@" | |
EOF | |
chmod 700 sshwrap | |
export GIT_SSH="./sshwrap" | |
virtualenv env | |
. env/bin/activate | |
pip install --upgrade git+ssh://[email protected]/user/repo.git |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The problem — you want to run the
pip install git+ssh://[email protected]/user/repo.git
line at then end, but yourjenkins
user doesn't have SSH access to GitHub.TheOne possible solution — hardcode the SSH private key in your build config, save it to a file, and setGIT_SSH
so that Git will use the private key you provide.