appleboy / appleboy/drone-git-push

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

Open
#49 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
74
Forks
33
Avg merge
3m
Merged PRs (30d)
1

Description

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__:

```yml
- name: update readme
image: jobrunr.io/build-container:1.0
commands:
- rm -f *.hprof
- sed -i "s@.*@${DRONE_TAG}@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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.