Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

terminal prompts disabled when submodules: true #738

Open
piuy11 opened this issue Mar 23, 2022 · 7 comments
Open

terminal prompts disabled when submodules: true #738

piuy11 opened this issue Mar 23, 2022 · 7 comments

Comments

@piuy11
Copy link

piuy11 commented Mar 23, 2022

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.

@piuy11
Copy link
Author

piuy11 commented Mar 24, 2022

Solved by solution from here, but submodules: true still not working..

@bjonnh-work
Copy link

This is a new issue for us all our builds were working up to yesterday or so and started to fail today.

@twizmwazin
Copy link

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.

@bjonnh-work
Copy link

This was not the case for us it was not expired, we switched to SSH keys for everything and the issue is gone.

@milad77pnq
Copy link

milad77pnq commented Apr 2, 2022 via email

@alexmigf
Copy link

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!

@followthemoney1
Copy link

In my case I've remove option "Restrict who can push to specific branch" option from repo settings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants