newbie question :)
hello all! so i setup a self-hosted instance of coder. I am using the out of the box docker devcontainer workspace template.
I chose the custom url which points to my personal github repository.
I followed the guide where I needed to create a github oauth app. I got the callback url, client secret id and client id setup as env vars to the systemd service running coder. how do I provide my git credentials to the workspace?
however, when i launct he worksspace i get this error
envbuilder v1.1.0+a3a6a83 - Build development environments from repositories in a container
#1: 📦 Cloning https://github.com/REDACTED/REDACTED.git to /workspaces/sai...
#1: 👤 Using no authentication!
#1: Parsed Git URL as "https://github.com/REDACTED/REDACTED.git"
Failed to clone repository: clone "https://github.com/REDACTED/REDACTED.git": authentication required
Falling back to the default image...
5 Replies
<#1360848124070858905>
Category
Help needed
Product
Coder (v2)
Platform
Linux
Logs
Please post any relevant logs/error messages.
ngl the docs are also unclear, there's too much magic happening. just trying to clone a project using ssh within a workspace is such a pain...
getting this error below when launching the workspace, even though I ran
coder publickey
before...
would appreciate if anyone has a guide or could list me steps plsto pass your GitHub credentials down to the workspace, you'll have to set up External Auth and define
ENVBUILDER_GIT_USERNAME
from data.coder_external_auth.github.access_token
see https://github.com/coder/envbuilder/blob/main/docs/git-auth.md for more details, just be aware that this type of auth only works with HTTP, not with SSH (this is a GitHub limitation in general, not a Coder thing)
envbuilder
is a bit of a frankenstein usage indeed, and does require "magic", which in turn leads to friction and needs some tinkering
i'll look into upgrading our example templates to make this a bit easier in the future
for this, you'll have to pass your Coder user's SSH key down to envbuilder
see https://discord.com/channels/747933592273027093/1359681136967684137 for an explanation
though, one question, do you have any devcontainer spec at all in that private repo? or are you just trying Coder out?@Phorcys tyvm for the suggestion/reply I will give it a go tonight.
i was giving coder a go, so I havent added a devcontainer spec yet
sounds good, let me know how it goes