79320498

Date: 2024-12-31 17:28:34
Score: 2
Natty:
Report link

just create bin/pre_compile file, and add two env variables to heroku GITHUB_USER and GITHUB_AUTH_TOKEN this helped me since using ssh doesn't work for me for some reason

#!/bin/bash

if [ -f "$ENV_DIR/GITHUB_USER" ]; then
  GITHUB_USER=$(cat "$ENV_DIR/GITHUB_USER")
fi

if [ -f "$ENV_DIR/GITHUB_AUTH_TOKEN" ]; then
  GITHUB_AUTH_TOKEN=$(cat "$ENV_DIR/GITHUB_AUTH_TOKEN")
fi

if [ -z "$GITHUB_USER" ]; then
    echo "GITHUB_USER is not set."
    exit 1
fi

if [ -z "$GITHUB_AUTH_TOKEN" ]; then
    echo "GITHUB_AUTH_TOKEN is not set."
    exit 1
fi

sed -i "s#git+ssh://[email protected]/#git+https://$GITHUB_USER:[email protected]/#g" requirements.txt
Reasons:
  • RegEx Blacklisted phrase (2): doesn't work for me
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Shtykhnov