GOPRIVATE repository

I’m using some privates modules for Go applications. But i could not make it works.
On my own server i use .gitconfig and a github credential like:
[url "https:xxxx@github.com"] insteadOf = https://github.com

I tried adding this file in “Secret Files” but it doesn’t works.
At Scalingo (same kind of PAAS) i use an env GO_GIT_CRED__HTTPS__GITHUB__COM.

My private modules are on the same account as the app (also private) but it doesn’t help (it’s normal i believe).

How do you do this here ?

Hi there,

Thanks for reaching out.

I think we managed to resolve this over chat, the suggestion was to include Environment Variables of the GitHub credentials and a git config line in your Build Command, e.g.:

1. Add GITHUB_USER, GITHUB_TOKEN to the service as environment variables

2. In the Build Command, reference those variables to set the git config in the build container:

git config --global url."https://${GITHUB_USER}:${GITHUB_TOKEN}@github.com".insteadOf "https://github.com"

It might be an idea to create a render_build.sh script in the root of your code to use as the Build Command, so that you can add any other steps required for your project setup.

If you came up with an alternative solution in the end, please feel free to share it with the community.

Thanks for using Render!

Alan