Is the external auth gone?
Hi there,
For some reason, the external auth step in the workspace creation is gone for me.
As mentioned in the documentation, there should be a "Git authentication" part in the setup of a new workspace. But for some reason it's gone from my instance. I still have this part in my template code:
I also tried the
coder_git_auth
instead:
but the auth is still missing as you can see in the screenshot.
Since I edited the template file a lot, it's possible that I removed something, but I'm not sure what.
Or is this maybe a bug in the current coder version?
Thanks!External Auth - Coder v2 Docs
Learn how connect Coder with external auth providers
38 Replies
does the access token still get generated properly ?
You mean within the workspace?
I noticed this first, when I created a new workspace and within the workspace I needed to login to my instance again. Then I realized that the git auth prompt is missing in the creation process
can you share your full template ?
This is most likely a bug. What version of Coder are you on?
I'm using the latest version
v2.8.3+01c6266
. Is there anything else I can test?That's very strange. I am not able to reproduce this at my deployment.
Is there anything I can test?
I can also provide my Dockerfile, if that helps
I have two coder instances (one for test), that has the same issue
Here is my Dockerfile:
https://share.zkr.io/code/EmbyWu.sh
I tried the default docker template and added the
coder_external_auth
, build it and tested it@Atif Can I somehow test, if the access token is provided within the container?
I saw that the
coder_git_auth
is deprecated and switched back to coder_external_auth
without setting the GITHUB_TOKEN env in the coder_agent
Should this work within the container?
@Steven can you take a look when you have sometime? I am not able to reproduce this. Could this be reletaed to gitea only?
no. These are only the provisioner
I think you're supposed to pass the output of the auth as an environment variable to the coder agent
maybe try that
something like coder_git_auth's example but with external_auth instead
https://registry.terraform.io/providers/coder/coder/latest/docs/data-sources/git_auth
I can take a look today 👍
Use
coder_external_auth
, the git was is deprecated.
If it's not listing on the UI, then something is incorrect with the terraform.
@Zoker can you share the settings set on the deployment?
At /deployment/external-auth
?
Or the env vars used to set the external auth? (Scrubbing any secrets)What I found out so far:
The listing has changed from version 2.7.x to 2.8.x.
The auth is now only shown if not set before the creation of a workspace.
What is still strange: Even without setting a env like
GITHUB_TOKEN
in the terraform file, the git auth worked for me without any issue until it didn't anymore.
Now even if I set the env war, git is not authenticated and echo $GITHUB_TOKEN within the workspace does not give me any output.
This is what I set on the terraform file
And confirm the template version you posted is the latest active version (promoted)
Should I check this within the workspace?
On the template page.
This path
/templates/docker/versions
You can see and change the selected version for a workspace
Yes
@Zoker and I confirmed external auth is working. It's VSCODE using it's own
GIT_ASKPASS
🤔So the question is, how to set a gitea/github token within the current VS Code version, right?
I think it's how to make
GIT_ASKPASS
back to the coder one.
Back to the system default
I think you can set that to false in vscode settings, and it will workHmm even after setting this, i'm being asked for my git credentials
Did you reload vscode?
you can
env | grep GIT_ASKPASS
to see what it is set toYes I restarted the workspace
It's still set to their
askpass.sh
What should the path be?
Something like
GIT_ASKPASS=/tmp/coder.cTn36d/coder
, run env in a normal terminal outside VSCodeAh yes I see this in my terminal
GIT_ASKPASS=/tmp/coder.sCiCfW/coder
So I tested this again and now it works 🎉
Do you know if I still need to set the GITHUB_TOKEN env in the template?
Thanks!
I tested it and I don't need the GITHUB_TOKEN env.
So this solves the topic, just set "git.useIntegratedAskPass": false,
in the VS Code settings. Thanks @Atif, @Phorcys and especially @Steven for the help! Really appriciate itgreat! I would've never guessed that was the cause
What about the issue external auth button not appearing in the workspace creation form? Is that resolved?
@Atif It was just moved. The FE changed so now it appears before the workspace creation page.
Is it at Account/ external auth?
It is still there, just the workspace creation was shifted
It does not show on mine. Can only see it in account -> external auth, but without any effect in a workspace.
But I dont want to hijack the post. So created my own 🙂