github-push-action icon indicating copy to clipboard operation
github-push-action copied to clipboard

Facing issues while pushing to master

Open yrsurya opened this issue 4 years ago • 5 comments

! [remote rejected] master -> master (refusing to allow a GitHub App to create or update workflow .github/workflows/build.yml without workflows permission)

using PAT keys where enabled workflow but still seeing this issue Any Help would be appreciated

yrsurya avatar Dec 09 '20 02:12 yrsurya

Please provide your workflow file.

ad-m avatar Dec 09 '20 18:12 ad-m


on:
  push:
    branches: [master]

jobs:
  setup-repo-from-template:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-node@v2-beta
        with: { node-version: '14', registry-url: `'xxxxx'` }
      - env: { NODE_AUTH_TOKEN: "${{ secrets.JFROG_NPM_PUBLISH_AUTH }}" }
        run: chmod a+x ./init.sh && ./init.sh
      - name: Commit files
        run: |
          git config --local user.email "[email protected]"
          git config --local user.name "$GITHUB_ACTOR"
          git add .
          git status
          git commit -a -m "Initialize new repository from template"
          git push https://${{ secrets.GH_TOKEN_TEST }}@github.com/org/repoi.git
      - name: Push changes
        uses: ad-m/github-push-action@master
        with:
          github_token: ${{ secrets.GH_TOKEN_TEST }}
          branch: ${{ github.ref }}

yrsurya avatar Dec 09 '20 18:12 yrsurya

Let's try:


on:
  push:
    branches: [master]

jobs:
  setup-repo-from-template:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - uses: actions/setup-node@v2-beta
        with: { node-version: '14', registry-url: `'xxxxx'` }
      - env: { NODE_AUTH_TOKEN: "${{ secrets.JFROG_NPM_PUBLISH_AUTH }}" }
        run: chmod a+x ./init.sh && ./init.sh
      - name: Commit files
        run: |
          git config --local user.email "[email protected]"
          git config --local user.name "$GITHUB_ACTOR"
          git add .
          git status
          git commit -a -m "Initialize new repository from template"
          git push https://${{ secrets.GH_TOKEN_TEST }}@github.com/org/repoi.git
      - name: Push changes
        uses: ad-m/github-push-action@master
        with:
          github_token: ${{ secrets.GH_TOKEN_TEST }}
          branch: ${{ github.ref }}

ad-m avatar Dec 09 '20 21:12 ad-m

Error: Process completed with exit code 128.

Got this error while git push

yrsurya avatar Dec 09 '20 23:12 yrsurya

I just ran into this issue (not on master specifically) and changed the last line branch: ${{ github.ref }} to branch: ${{ github.head_ref }} and it fixed it

EleanorHaproff avatar Dec 16 '20 16:12 EleanorHaproff