Private Git Repositories
When working with Pulumi Deployments, you may need to access private Git repositories.
Private Dependency Packages
If your Pulumi Deployment requires access to private GitHub repositories, e.g. your program uses a private Go module, it is necessary to configure an SSH key with access to the required repos. Without the correct configuration, the Deployment will be unable to access those private artifacts, and the deployment may fail.
The following will allow you to configure a private key and allow access to GitHub using SSH to pull down the appropriate artifacts properly:
Add the following code into the
Pre-run commands
and toggle onSkip automatic dependency installation step
in Advanced Settings:mkdir /root/.ssh && printf -- "$SSHKEY" > /root/.ssh/id_ed25519 chmod 600 /root/.ssh/id_ed25519 ssh-keyscan github.com >> ~/.ssh/known_hosts cd .. && git config --global --add url.\"git@github.com:\".insteadOf \"https://github.com\"
Add the
$SSHKEY
field as a secret environment variable:
Thank you for your feedback!
If you have a question about how to use Pulumi, reach out in Community Slack.
Open an issue on GitHub to report a problem or suggest an improvement.