Skip to content

2FA and Github: how to solve could not read Username for 'https://github.com' #49

Description

@rdehuyss

This is a follow-up for issue #43 . I just tried with a new release - still have some issues.

You can find drone.yml here: https://github.com/jobrunr/jobrunr/blob/master/.drone.yml.

What I try to do: update the Readme with the latest version (so the tag)
How do I try it:

  - name: update readme
    image: jobrunr.io/build-container:1.0
    commands:
      - rm -f *.hprof
      - sed -i "s@<version>.*</version>@<version>${DRONE_TAG}</version>@g" README.md # replace version in README
      - sed -i "s@'org.jobrunr:jobrunr:.*'@'org.jobrunr:jobrunr:${DRONE_TAG}'@g" README.md # replace version in README
      - git config --global --add url."git@github.com:".insteadOf "https://github.com/" # Switch to ssh instead of https

  - name: push updated readme
    image: appleboy/drone-git-push
    settings:
      branch: master
      remote_name: origin
      ssh_key:
        from_secret: GITHUB_SSH_KEY
      force: false
      commit: true
      commit_message: "Update readme to new version [CI SKIP]"
      author_name: drone-bot
      author_email: drone-bot@jobrunr.io

The output for step push updated readme:

latest: Pulling from appleboy/drone-git-push
--
2 | Digest: sha256:144fd3130840d8ca0eba4b2aa98da027086d2d3fee6f2fbf4914564ad0a3b3f1
3 | Status: Image is up to date for appleboy/drone-git-push:latest
4 | + git add --all
5 | + git diff-index --quiet HEAD --ignore-submodules
6 | + git commit -m Update readme to new version [CI SKIP]
7 | + git push origin HEAD:master
8 | fatal: could not read Username for 'https://github.com': terminal prompts disabled
9 | exit status 128

Any idea on how to solve this?

Thanks again,
Ronald

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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