question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

terminal prompts disabled when submodules: true

See original GitHub issue

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.

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:3
  • Comments:6

github_iconTop GitHub Comments

1reaction
alexmigfcommented, Sep 21, 2022

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:

  1. Regenerated my personal token here.
  2. Copy to the organization secrets:

Captura de ecrã de 2022-09-21 12-53-46

  1. Click the update button below and insert the update personal token:

Captura de ecrã de 2022-09-21 12-53-55

Done!

0reactions
milad77pnqcommented, Apr 2, 2022

در تاریخ چهارشنبه ۲۳ مارس ۲۰۲۲،‏ ۱۲:۲۲ 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: @.***>

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found