Skip to content

error: remote origin already exists #107

@laur89

Description

@laur89
latest: Pulling from appleboy/drone-git-push
Digest: sha256:7f95c270b2f0808aa5f6854504c65599ac9dad956c17d33ca4321f7f8d54fcba
Status: Image is up to date for appleboy/drone-git-push:latest
+ git config user.name myusername
+ git config user.email myemail@gmail.com
+ git remote add origin git@github.com:myusername/myrepo.git
error: remote origin already exists.
exit status 3

If I have a previous drone step that made a commit, how to use drone-git-push to push said changes?

.drone.yaml:

- name: git-push
  image: appleboy/drone-git-push
  settings:
    ssh_key:
      from_secret: github_ssh_key
    remote_name: origin
    branch: "${DRONE_BRANCH}"
    remote: "${DRONE_GIT_SSH_URL}"
    force: false
    followtags: true
  when:
    branch:
    - master

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions