dokku / gitlab-ci

A collection of gitlab-ci examples
34 stars 12 forks source link

Invalid `GIT_REMOTE_URL`? #4

Closed Benjamint22 closed 1 year ago

Benjamint22 commented 3 years ago

Using the following config file, based on simple.yml, gave me an error that stopped the deployment:

.gitlab-ci.yml ```yaml image: dokku/ci-docker-image stages: - deploy variables: GIT_DEPTH: 0 deploy: stage: deploy only: - master variables: GIT_REMOTE_URL: ssh://dokku@benjamintaillon.com:22/discorddroid environment: name: production script: - dokku-deploy after_script: - dokku-unlock ```

image

After updating it to the following, it worked:

.gitlab-ci.yml (diff) ```diff image: dokku/ci-docker-image stages: - deploy variables: GIT_DEPTH: 0 deploy: stage: deploy only: - master variables: - GIT_REMOTE_URL: ssh://dokku@benjamintaillon.com:22/discorddroid + GIT_REMOTE_URL: ssh://dokku@benjamintaillon.com:22/~/discorddroid environment: name: production script: - dokku-deploy after_script: - dokku-unlock ```

Could it have something to do with my local setup? I'm opening this issue just in case the issue may be more widespread.

josegonzalez commented 1 year ago

I know this is a late response, but I think this might be due to how the ssh key was added to the dokku user. If anyone is still seeing this issue, please create a new ticket and post the contents of /home/dokku/.ssh/authorized_keys. The ssh keys should have been added via the dokku ssh-keys:add command, but the above error appears for me when the key is added directly to the file.

Closing for now, but feel free to comment if you never figured this out @Benjamint22 .