Question: how to solve could not read Username for 'https://github.com'
rdehuyss opened this issue · comments
Dear,
I'm trying to use your plugin to update the version on my Readme.md and it works using drone exec on my local machine.
In drone itself however, I receive the following error:
latest: Pulling from appleboy/drone-git-push
--
2 | Digest: sha256:b646fd6089dfdac9d86ce9b82225f2758a4c9e9340b3b86e68471395bc3d2e05
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
This is my config:
- 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
I think it might be related to the fact that I have 2FA enabled. See https://jacopretorius.net/2018/05/git-error-could-not-read-username.html
Thanks,
Ronald
one year later, I still suffer from this problem - is there a way to force git to use ssh instead of https?
You face the problem if 2FA enabled? right? I want to reproduce your problem.
I may have a solution - the next release I will try it.
See https://github.com/jobrunr/jobrunr/blob/master/.drone.yml#L186-L205
Thanks for getting back at me!
OK. I closed the issue.