-
My team and I are working on deploying a code-server instance behind an nginx reverse proxy in a Kubernetes cluster. We haven't been able to successfully use the github-auth feature to persistently authenticate the user with Github. The Github token is passed in as an environment variable and we've verified that it exists, however when performing a What we're trying to do is prevent the user from having to go through the Github OAuth flow. We already have separate process in our application where users go through this flow, so we already have their Github token available to us. They should not need to go through the OAuth flow again. We've tried the following workarounds:
We were able to run this block in a running code-server and git clone without being prompted to authenticate: git config --global credential.helper 'cache'
git credential approve <<EOF
protocol=https
host=github.com
username="$GIT_TOKEN"
password=x-oauth-basic
EOF However, we need this authentication to happen automatically and placing the above block in our .profile or .bashrc, which are persisted between deploys, didn't work either. Are we doing something wrong or do we misunderstand what is the expected behavior? I see similar questions have been asked in the past; we've read these and tried implementing the answers but still have had no luck. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I think those issues were from back when we had a custom implementation for GitHub auth, but that was removed a while back since VS Code added their own
After reading them, we unset environment vars like I wonder if the token is missing scopes? I think It would be ideal if we could test with VS Code web standalone to see if it is a code-server issue or upstream issue but looks like they have not added it to |
Beta Was this translation helpful? Give feedback.
I'm not sure I understand your explanation. What is the connection between the authenticating with Github extension and testing the VS Code web standalone? Does code-server depend on serve-web?
Regardless, we were able to formulate a successful workaround with the following changes:
Dockerfile
init script