Private repositories

It is often useful to add a dependency on a private code respository hosted by a service like GitHub, GitLab, or Bitbucket. As with PyPi packages, these dependencies should be specified in the requirements.txt file, using the following format:

-e git+ssh://

The portion after egg= serves to specify the package name.

It can be useful to hard-code a specific version of the codebase into the URL. You can do this by specifying a particular commit hash, tag, or branch.

# Commit hash
-e git+ssh://
# Branch name
-e git+ssh://
# Release
-e git+ssh://

If your repository is private then you will need to provide the credentials to access it. We recommend creating a personal access token (PAT) for your GitHub account or equivalent with read-only permissions (see e.g. the GitHub documentation for instructions), and including it in an HTTPS repository link as follows:

-e git+

Theoretically one could also pass this PAT as an environment variable.

-e git+https://${GITLAB_PAT}

However, this would require the environment variable to be set already for the Heroku app, which would require modifying the existing Dallinger deploy routine in a way that is not yet explicitly supported by the Dallinger API.