Interview Prep/GitHub Actions/Permissions, Tokens & Secrets

`fatal: could not read Username for 'https://github.com': terminal prompts disabled` when cloning a second private repo.

BeginnerTroubleshootingPermissions, Tokens & Secrets
Answer

Likely causes → GITHUB_TOKEN only covers the current repository; cloning another private repo has no credentials.

Diagnose → Check which repo the failing git clone or actions/checkout targets.

Fix →

- id: app
  uses: actions/create-github-app-token@v2
  with:
    app-id: ${{ vars.APP_ID }}
    private-key: ${{ secrets.APP_KEY }}
    repositories: shared-config
- uses: actions/checkout@v4
  with:
    repository: devopsshack/shared-config
    token: ${{ steps.app.outputs.token }}
    path: shared-config

Prevent → Standardize on an org GitHub App for cross-repo access instead of PATs.

All GitHub Actions questions Roadmap: GitHub Actions

More on Permissions, Tokens & Secrets