Error: fatal: could not read Username for 'https://github.com': terminal prompts disabled
See original GitHub issueHello,
I’m attempting a rollback flow using actions/checkout@v2
. The problem is that I need to use a PAT in order to rollback commits that change Github Workflows and when I pass that PAT into actions/checkout, I get an error.
Error: fatal: could not read Username for 'https://github.com': terminal prompts disabled
My workflow:
name: "Dev Deploy"
on:
workflow_run:
workflows: ["Versioning"]
types: [completed]
jobs:
fail_job:
runs-on: ubuntu-latest
steps:
- name: Fail
run: |
exit 1
rollback-on-failure:
runs-on: ubuntu-latest
needs: [fail_job]
if: always() && needs.fail_job.result == 'failure'
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
token: ${{ secrets.WORKFLOW_TOKEN }}
- run: chmod +x environment/rollback.sh && ./environment/rollback.sh
The PAT used has the permissions to change workflows, as well as repository permissions. The issue seems to be that the action doesn’t allow me to set a username before it tries to fetch the repository.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:19
- Comments:19
Top Results From Across the Web
go get results in 'terminal prompts disabled' error for github ...
Don't do this on Windows. I ended up with error git@github.com: Permission denied (publickey). fatal: Could not read from remote repository. .
Read more >could not read Username for 'https://github.com': terminal ...
Getting a fatal error that looks to be the result of permission issues involving git. Configuration (MUST fill this out):. vim-go version:.
Read more >Today I Learned — Fix for “Fatal: could not read Username for ...
fatal : could not read Username for 'https://gitlab.companyname.com': terminal prompts disabled. There are a couple of solutions to this ...
Read more >Fatal: Could Not Read Username for 'https://github.com'
Fatal : could not read Username for 'https://github.com': terminal prompts disabled error is frustrating. Click here to learn the best solutions.
Read more >Fatal: could not read Username for 'https://github ... - Streamlit
[manager] Cloning into 'streamlit-test'... fatal: could not read Username for 'https://github.com': terminal prompts disabled
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Another hint: The PAT must have an expiry date, otherwise the same error appears 😅.
I’m also experiencing the same issue. I wanted to add a checkout of another private repo, that lives in the same organisation as the original private repo which the workflow is in.
My code:
Results:
Checkout the private repo in which the workflow lives
✔️Checkout a public repo to see if it works
✔️Checkout another private repo in the same organisation
❌The error: