Skip to content

unable to push #302

@laur89

Description

@laur89

There's a workflow A:

name: Root workflow

on: [push]

jobs:
  call-build:
    permissions:
      contents: write
    uses: org/workflows/.github/workflows/reusable-B.yml@master
    secrets: inherit

that calls a reusable workflow reusable-B.yml:

jobs:
  version-tag-changelog:
    name: Version & tag the release
    if: ${{ github.ref == 'refs/heads/master' }}
    runs-on: ubuntu-latest
    steps:
    - uses: actions/create-github-app-token@v2
      id: app-token
      with:
        app-id: ${{ vars.APP_ID }}
        private-key: ${{ secrets.APP_KEY }}
    - uses: actions/checkout@v5
      with:
        token: ${{ steps.app-token.outputs.token }}
        ref: ${{ github.head_ref }}
        persist-credentials: false
    - name: Configure git
      run: |
        git config --global user.name 'workflow-bot'
        git config --global user.email 'ci@github'
    - name: Install zestreleaser & cut a tag
      env:
        GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
      run: |
        some commands that create commits and tags
        git push --follow-tags

Yet the last push fails with 128:

fatal: could not read Username for 'https://github.com/': No such device or address
Error: Process completed with exit code 128.

This discussion suggests url needs to be reconfigured to contain the token:

git config --global url."https://x-access-token:${{ steps.app-token.outputs.token }}@github.com/".insteadOf https://github.com/

Should this instruction be included in the readme?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions