checkout
checkout copied to clipboard
terminal prompts disabled when submodules: true
Having issue with submodules. I have a private repo which has other private repos as submodules. Tried with the workflow below, but keeps showing following error message for all my submodules:
/usr/bin/git -c protocol.version=2 submodule update --init --force --depth=1 --recursive
Cloning into '<MY_SUBMODULE_REPO>'...
Error: fatal: could not read Username for 'https://github.com/': terminal prompts disabled
However, since removing line with submodules from workflow worked (without cloning submodules), I assume that auth process is broken.
My workflow:
name: Testing
on:
push:
branches: [ test-action ]
jobs:
steps:
runs-on: self-hosted
steps:
- uses: actions/checkout@v2
with:
submodules: true
ssh-key: ${{ secrets.SSH_KEY }}
What I tried:
- Checked secrets
- Tried with token instead of ssh-key (including checking scopes of PAT)
- Change self-hosted to ubuntu-latest
All didn't work.
Solved by solution from here, but submodules: true still not working..
This is a new issue for us all our builds were working up to yesterday or so and started to fail today.
I experienced this issue as well, cloning private submodules where the URL is specified as SSH. Turns out my PAT was expired, refreshing it seems to have solved it for me.
This was not the case for us it was not expired, we switched to SSH keys for everything and the issue is gone.
در تاریخ چهارشنبه ۲۳ مارس ۲۰۲۲، ۱۲:۲۲ piuy11 @.***> نوشت:
Having issue with submodules. I have a private repo which has other private repos as submodules. Tried with the workflow below, but keeps showing following error message for all my submodules:
/usr/bin/git -c protocol.version=2 submodule update --init --force --depth=1 --recursive Cloning into '<MY_SUBMODULE_REPO>'... Error: fatal: could not read Username for 'https://github.com/': terminal prompts disabled
However, since removing line with submodules from workflow worked (without cloning submodules), I assume that auth process is broken.
My workflow:
name: Testing on: push: branches: [ test-action ] jobs: steps: runs-on: self-hosted steps: - uses: @.*** with: submodules: true ssh-key: ${{ secrets.SSH_KEY }}
What I tried:
- Checked secrets
- Tried with token instead of ssh-key (including checking scopes of PAT)
- Change self-hosted to ubuntu-latest
All didn't work.
— Reply to this email directly, view it on GitHub https://github.com/actions/checkout/issues/738, or unsubscribe https://github.com/notifications/unsubscribe-auth/AW3KO645RWIPOLMQFCCFBFDVBLEUFANCNFSM5RNFLQOQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>
In our organization this error was caused by the fact that the Personal Access Token (PAT) had expired.
To be able to checkout the submodule, a PAT is required - this is passed in the workflow as an environment value that is retrieved from the repo "secrets":
- name: Checkout Git repository
uses: actions/checkout@v2
with:
token: ${{ secrets.PAT }}
path: ${{ env.plugin_slug }}
submodules: true
The annoying thing is that the PAT needs to be linked to a specific account (so not the Github organization). So I discover that my "personal" PAT was outdated.
Solution was simple:
- Regenerated my personal token here.
- Copy to the organization secrets:
- Click the update button below and insert the update personal token:
Done!
In my case I've remove option "Restrict who can push to specific branch" option from repo settings