Ryan
Ryan
CCoder.com
Created by Ryan on 3/14/2025 in #help
Github Oauth Config Issue
Tried it on three different browsers. Neither attempt was incognito mate. Yeah I get that but as you can see in the screen recording, it's not setting it in the first place, even in that session in the same browser
32 replies
CCoder.com
Created by Ryan on 3/14/2025 in #help
Github Oauth Config Issue
I can still type of stuff it's just annoying lol
32 replies
CCoder.com
Created by Ryan on 3/14/2025 in #help
Github Oauth Config Issue
Ahh ok fair enough, thank you
32 replies
CCoder.com
Created by Ryan on 3/14/2025 in #help
Github Oauth Config Issue
Also (slightly off topic kinda) but I keep trying to set my keyboard layout to UK but it's not acknowledging and saving it. It's persisting on using US. Does it matter?
32 replies
CCoder.com
Created by Ryan on 3/14/2025 in #help
Github Oauth Config Issue
Ohh ok, nice. I honestly didn't even know that was a thing. Where in the docs can I find the instructions on how to do this?
32 replies
CCoder.com
Created by Ryan on 3/14/2025 in #help
Github Oauth Config Issue
You mean the SSH terminal right? I won't be able to access that in college, only at home. I'll only be able to access code-server instance via the browser
32 replies
CCoder.com
Created by Ryan on 3/14/2025 in #help
Github Oauth Config Issue
Which would you recommend? 'cause obviously, in college, I won't be able to access the terminal due to the college's network security policies and all that
32 replies
CCoder.com
Created by Ryan on 3/14/2025 in #help
Github Oauth Config Issue
I'm not overly bothered about a Github login, I just need to the option configured to be able to at least push and pull Github repo's, I'm honestly not bothered how it's done as long as I don't manually have to do the git URL each and every time. I set it up because I'm on a college course as an adult, and we're covering web development as part of the course but the computers outside of the class in the rest of the college doesn't have Visual Studio Code installed which is frustrating when we're trying to keep on top of our assignments
32 replies
CCoder.com
Created by Ryan on 3/14/2025 in #help
Github Oauth Config Issue
When visiting the coder instance, can't even get to the login the 502 stops me. I just need Github integration, so I can see, pull and push to my Github repo's including private ones and without having to manually add each repo git URL each time etc., similar to how you do in the main Visual Studio Code.
32 replies
CCoder.com
Created by Ryan on 3/14/2025 in #help
Github Oauth Config Issue
My Nginx (/etc/nginx/sites-available/code-server)
server {
server_name ukvsc.ryandavies.uk;

location / {
proxy_pass http://127.0.0.1:8080;
proxy_set_header Host $host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection upgrade;
proxy_set_header Accept-Encoding gzip;
}

listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/ukvsc.ryandavies.uk/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/ukvsc.ryandavies.uk/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

}
server {
if ($host = ukvsc.ryandavies.uk) {
return 301 https://$host$request_uri;
} # managed by Certbot


listen 80;
server_name ukvsc.ryandavies.uk;
return 404; # managed by Certbot


}
server {
server_name ukvsc.ryandavies.uk;

location / {
proxy_pass http://127.0.0.1:8080;
proxy_set_header Host $host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection upgrade;
proxy_set_header Accept-Encoding gzip;
}

listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/ukvsc.ryandavies.uk/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/ukvsc.ryandavies.uk/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

}
server {
if ($host = ukvsc.ryandavies.uk) {
return 301 https://$host$request_uri;
} # managed by Certbot


listen 80;
server_name ukvsc.ryandavies.uk;
return 404; # managed by Certbot


}
32 replies
CCoder.com
Created by Ryan on 3/14/2025 in #help
Github Oauth Config Issue
My /etc/systemd/system/code-server.service
Description=code-server
After=network.target

[Service]
Type=simple
User=root
ExecStart=/usr/bin/code-server --bind-addr 127.0.0.1:8080 --auth password
Environment=CODER_EXTERNAL_AUTH_0_ID="primary-github"
Environment=CODER_EXTERNAL_AUTH_0_TYPE="github"
Environment=CODER_EXTERNAL_AUTH_0_CLIENT_ID="[redacted]"
Environment=CODER_EXTERNAL_AUTH_0_CLIENT_SECRET="[redacted]"
Restart=always

[Install]
WantedBy=multi-user.target
Description=code-server
After=network.target

[Service]
Type=simple
User=root
ExecStart=/usr/bin/code-server --bind-addr 127.0.0.1:8080 --auth password
Environment=CODER_EXTERNAL_AUTH_0_ID="primary-github"
Environment=CODER_EXTERNAL_AUTH_0_TYPE="github"
Environment=CODER_EXTERNAL_AUTH_0_CLIENT_ID="[redacted]"
Environment=CODER_EXTERNAL_AUTH_0_CLIENT_SECRET="[redacted]"
Restart=always

[Install]
WantedBy=multi-user.target
32 replies
CCoder.com
Created by Ryan on 3/14/2025 in #help
Github Oauth Config Issue
My environment file:
# GitHub OAuth Configuration for code-server
export CODER_EXTERNAL_AUTH_0_ID="primary-github"
export CODER_EXTERNAL_AUTH_0_TYPE="github"
export CODER_EXTERNAL_AUTH_0_CLIENT_ID="[redacted]"
export CODER_EXTERNAL_AUTH_0_CLIENT_SECRET="[redacted]"

# Optional display name and icon
export CODER_EXTERNAL_AUTH_0_DISPLAY_NAME="GitHub OAuth"
export CODER_EXTERNAL_AUTH_0_DISPLAY_ICON="https://github.com/favicon.ico"
# GitHub OAuth Configuration for code-server
export CODER_EXTERNAL_AUTH_0_ID="primary-github"
export CODER_EXTERNAL_AUTH_0_TYPE="github"
export CODER_EXTERNAL_AUTH_0_CLIENT_ID="[redacted]"
export CODER_EXTERNAL_AUTH_0_CLIENT_SECRET="[redacted]"

# Optional display name and icon
export CODER_EXTERNAL_AUTH_0_DISPLAY_NAME="GitHub OAuth"
export CODER_EXTERNAL_AUTH_0_DISPLAY_ICON="https://github.com/favicon.ico"
32 replies
CCoder.com
Created by Ryan on 3/14/2025 in #help
Github Oauth Config Issue
Here is what my config.yaml looks like currently:
bind-addr: 127.0.0.1:8080
auth: password
password: [redacted]

oauth:
- id: primary-github
client-id: $CODER_EXTERNAL_AUTH_0_CLIENT_ID
client-secret: $CODER_EXTERNAL_AUTH_0_CLIENT_SECRET
provider: github
redirect-uri: https://ukvsc.ryandavies.uk/external-auth/primary-github/callback

external-auth:
- id: primary-github
type: oauth2
client-id: $CODER_EXTERNAL_AUTH_0_CLIENT_ID
client-secret: $CODER_EXTERNAL_AUTH_0_CLIENT_SECRET
provider: github
bind-addr: 127.0.0.1:8080
auth: password
password: [redacted]

oauth:
- id: primary-github
client-id: $CODER_EXTERNAL_AUTH_0_CLIENT_ID
client-secret: $CODER_EXTERNAL_AUTH_0_CLIENT_SECRET
provider: github
redirect-uri: https://ukvsc.ryandavies.uk/external-auth/primary-github/callback

external-auth:
- id: primary-github
type: oauth2
client-id: $CODER_EXTERNAL_AUTH_0_CLIENT_ID
client-secret: $CODER_EXTERNAL_AUTH_0_CLIENT_SECRET
provider: github
32 replies