Coder.comC
Coder.com3y ago
81 replies
harland

Ssh clones using gitauth?

We are currently using gitlab as our hosted git solution and configured OIDC for our users to connect to coder. Is there any way to use gitauth to automatically add the correct ssh key to the git user's account in order to avoid having to do this step manually? I'm able to login and use an https clone without needing to authenticate but can't ssh clone,

Coder authenticates with  git  using the public key below. All clones with SSH  
are authenticated automatically 🪄.                                             

 ssh-ed25519 ...

Add to GitHub and GitLab:
> https://github.com/settings/ssh/new
> https://gitlab.com/-/profile/keys

exit status 255                     
Run 'coder gitssh --help' for usage.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

when cloning via ssh ^



CODER_GITAUTH_0_CLIENT_ID="***"
CODER_GITAUTH_0_CLIENT_SECRET="***"
CODER_GITAUTH_0_ID="primary-gitlab"
CODER_GITAUTH_0_TYPE=gitlab
CODER_GITAUTH_0_AUTH_URL="https://private-gitlab-url/oauth/authorize"
CODER_GITAUTH_0_TOKEN_URL="https://private-gitlab-url/oauth/token"
CODER_GITAUTH_0_VALIDATE_URL="https://private-gitlab-url/oauth/token/info"
CODER_GITAUTH_0_SCOPES="read_repository write_repository read_user read_api"


# Configure OIDC (OpenID Connect) for user auth
CODER_OIDC_CLIENT_ID="***"
CODER_OIDC_CLIENT_SECRET="***"
CODER_OIDC_ISSUER_URL="private-gitlab-url"
CODER_OIDC_EMAIL_DOMAIN="our-domain.com"

Coder Settings ^
Was this page helpful?