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

[ERROR] The deploy step encountered an error: The process '/usr/bin/git' failed with exit code 128 ❌ #1285

Closed
0xmaayan opened this issue Dec 13, 2022 · 4 comments

Comments

@0xmaayan
Copy link

Describe the bug

I have a github workflow that runs the deploy action whenever creating a PR against main branch. I noticed that when a contributor creates the PR (who is not admin/codeowner), the deploy action fails with this error - is that expected?

Screen Shot 2022-12-13 at 1 19 00 PM

@endaye
Copy link

endaye commented Jan 9, 2023

name: GitHub Pages Deploy

on:
  push:
    branches:
      - "dev/en"
env:
  VITE_APP_WALLETCONNECTION_PROJECT_ID: ${{ secrets.VITE_APP_WALLETCONNECTION_PROJECT_ID }}

jobs:
  build:
    runs-on: ubuntu-latest

    strategy:
      matrix:
        node-version: [16.x]

    steps:
      - name: Checkout
        uses: actions/checkout@v3
        with:
          lfs: true

      - name: Install and bulld
        run: npm i && npm run build

      - name: Deploy
        uses: JamesIves/github-pages-deploy-action@v4
        with:
          branch: gh-pages # The branch the action should deploy to.
          folder: build # The folder the action should deploy.

I have the same error on v4.4.1 😢

@remarkablemark
Copy link

remarkablemark commented Jan 15, 2023

I am also experiencing this issue for repository https://github.com/remarkablemark/parcel-jsx-dom-example:

Force-pushing changes...
/usr/bin/git push --force ***github.com/remarkablemark/parcel-jsx-dom-example.git github-pages-deploy-action/vloq8f6h0:gh-pages
remote: Permission to remarkablemark/parcel-jsx-dom-example.git denied to github-actions[bot].
fatal: unable to access 'https://github.com/remarkablemark/parcel-jsx-dom-example.git/': The requested URL returned error: 403
Running post deployment cleanup jobs… 🗑️
/usr/bin/git checkout -B github-pages-deploy-action/vloq8f6h0
Reset branch 'github-pages-deploy-action/vloq8f6h0'
/usr/bin/chmod -R +rw github-pages-deploy-action-temp-deployment-folder
/usr/bin/git worktree remove github-pages-deploy-action-temp-deployment-folder --force
Error: The deploy step encountered an error: The process '/usr/bin/git' failed with exit code 128 ❌
Notice: Deployment failed! ❌

Update: I figured out the issue. It seems like GitHub changed new repository default settings and made workflow permissions read-only by default. The fix was to add write permissions to the workflow:

permissions:
  contents: write

@Jebay
Copy link

Jebay commented Jan 19, 2023

@remarkablemark Thanks, your fix seems to work for me 🙏

@JamesIves
Copy link
Owner

Glad you got this resolved!

ebouchut added a commit to ebouchut/looptips that referenced this issue Apr 2, 2023
- 💚 Remove deprecation warnings when running publish.yml:
    - set-output command is deprecated
      See: JamesIves/github-pages-deploy-action#1241
      > Warning: The `set-output` command is deprecated and will be disabled
      > soon. Please upgrade to using Environment Files. For more information
      > https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands
    - Node.js 12 actions are deprecated
      > Node.js 12 actions are deprecated. Please update the following actions to use Node.js 16: JamesIves/github-pages-deploy-action@v4.2.5.
      > For more information see: https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/.
- 💚 Add content write permission to publish.yml Github Action
  See: JamesIves/github-pages-deploy-action#1285
cnstt added a commit to deep-finder/napari-deepfinder that referenced this issue Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants