GitLab Provider, OAuth application, coder agent, startup_script, git clone

Good morning,

I want to clone a gitlab repository when starting my workspace.

But the log tells me that I have to interact by clicking on a link to continue the procedure.
How do I proceed in non-interactive mode?

coder agent
resource "coder_agent" "main" { arch = "amd64" os = "linux" env = { GIT_AUTHOR_NAME = "${data.coder_workspace.me.owner}" GIT_COMMITTER_NAME = "${data.coder_workspace.me.owner}" GIT_AUTHOR_EMAIL = "${data.coder_workspace.me.owner_email}" GIT_COMMITTER_EMAIL = "${data.coder_workspace.me.owner_email}" } dir = "/workspace" startup_script = <<EOF #!/bin/sh if [ -z "$(ls -A /workspace)" ]; then git clone https://gitlab.com/${data.coder_parameter.docker_container.value}.git /workspace fi # start code-server code-server --auth none --port 13337 & # Start Docker sudo service docker start # ... EOF }

And coder-startup-script.log

coder@fa4e93932907:/workspace$ sudo tail -f /tmp/coder-startup-script.log Cloning into '/workspace'... Open the following URL to authenticate with Git: https://.....pit-1.try.coder.app/gitauth/primary-gitlab
Was this page helpful?