github private repo won't pull
I'll be fully honest here, I think this is an issue with the documentation.
I'm using the external auth method that has been recommended here a couple times.
I've gotten as far as installing the github app for my organization, and now I have a bunch of environment variables, but it's not specified what environment they need to be set in.
Are these supposed to be set in the terraform code for my template? In the docker compose file that defines my coder install? somewhere else?
Solution:Jump to solution
OK, turns out this was a layer-8 issue, though a very subtle/frustrating one.
Turns out
docker compose -f coder.yml restart
doesn't actually refresh the environment variables, so none of the changes I was making were getting shown to coder. This resolved itself after I used docker compose ... down
followed by docker compose ... up -d
.
Edit to add:...5 Replies
<#1322449893058547833>
Category
Help needed
Product
Coder (v2)
Platform
Linux
Logs
Please post any relevant logs/error messages.
Tried sticking it in compose and adding
to my terraform. Now i can get as far as clicking the Login with GitHub button, which promptly directs me to a 404 page.
Solution
OK, turns out this was a layer-8 issue, though a very subtle/frustrating one.
Turns out
docker compose -f coder.yml restart
doesn't actually refresh the environment variables, so none of the changes I was making were getting shown to coder. This resolved itself after I used docker compose ... down
followed by docker compose ... up -d
.
Edit to add:
The final solution was the following:
Coder.yml (Docker compose)
main.tf (terraform source code for template)Once you've made those additions, built, and published your template, you can then start to create a workspace, authenticate with github, and finally provide the https link to your private repository. Some pitfalls to watch out for: * If you're getting a 404 error, check the following: * that the callback url in the github url matches the one you put into your app * that the client id matches your github app
thanks for the detailed solution :)
@Phorcys closed the thread.