drone-git-push icon indicating copy to clipboard operation
drone-git-push copied to clipboard

Help wanted with dokku remote

Open HectorCastelli opened this issue 4 years ago • 1 comments

When trying to push to a Dokku remote, I get errors.

For the following examples website is my application name and domain.com is the domain that points to my server.

Running locally

On a local machine, this is as simple as running:

  1. ssh-add dokku_key
  2. git remote add dokku [email protected]:website
  3. git push dokku

First attempt

With the following drone config

  - name: push commit
    image: appleboy/drone-git-push
    settings:
      ssh_key:
        from_secret: dokku_ssh_key
      remote: [email protected]:website
      remote_name: dokku

I get the error:

level=fatal msg="parse \"[email protected]:website\": first path segment in URL cannot contain colon"

I imagine this is because of the lack of a protocol, in this case ssh. After adding it and trying again, no luck...

Second attempt

  - name: push commit
    image: appleboy/drone-git-push
    settings:
      ssh_key:
        from_secret: dokku_ssh_key
      remote: ssh://[email protected]:website
      remote_name: dokku

I get the error:

level=fatal msg="parse \"ssh://[email protected]:website\": invalid port \":website\" after host"

HectorCastelli avatar Oct 16 '20 08:10 HectorCastelli

I have exactly the same issue, the following workaround fixed it for me. Although, I would wish this gets fixed in a new release.

Work-around is: image: appleboy/drone-git-push:0.2.0-linux-amd64 Originally posted by @decentral1se in https://github.com/appleboy/drone-git-push/issues/40#issuecomment-604039073

emadzz avatar Nov 04 '20 18:11 emadzz