Created
May 24, 2018 00:14
-
-
Save gtalarico/56919d749ec64f1f9f3ba2f16b4a4d6a to your computer and use it in GitHub Desktop.
Install Private Git on Heroku w/ exposing credentials in requirements.txt
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
# Add this file to app root, Heroku will execute it on start, clone repo and add location to path | |
DIR=./package | |
if [ -d "$DIR" ]; then | |
printf '%s\n' "Deleting existing folder: ($DIR)" | |
rm -rdf "$DIR" | |
fi | |
# GIT_CREDENTIALS=username:pwd | |
echo "Cloning..." | |
git clone --progress --branch master --depth=1 --single-branch http://${GIT_CREDENTIALS}@github.com/org/repo.git package | |
echo "Cloning completed. Adding Package to PATH" | |
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/package" | |
echo "Adding to PTH: ${DIR}" | |
export PYTHONPATH=$DIR:$PYTHONPATH |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment