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

Github action fails with The process '/usr/bin/git' failed with exit code 1 #6240

Closed
1 task done
Tbaut opened this issue Jun 28, 2021 · 4 comments
Closed
1 task done
Labels
question This is more a question for the support than an issue.

Comments

@Tbaut
Copy link

Tbaut commented Jun 28, 2021

Describe the issue

We are running Github action for several tasks on the PRs that hosted weblate created on the repo. The problem is that the Github action checkout can't seem to be able to checkout the branch correctly.

I already tried

Describe the steps you tried to solve the problem yourself.

  • I've read and searched the docs and did not find the answer there.
    If you didn’t try already, try to search there what you wrote above.

To Reproduce the issue

Steps to reproduce the behavior:

  1. Go to Translations update from Weblate ChainSafe/ui-monorepo#1196
  2. Scroll down to the Github action steps
  3. Click on the linting job
  4. See error
Run actions/checkout@v2
Syncing repository: ChainSafe/files-ui
Getting Git version info
Deleting the contents of '/home/runner/work/files-ui/files-ui'
Initializing the repository
Disabling automatic garbage collection
Setting up auth
Fetching the repository
  /usr/bin/git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 origin +refs/heads/weblate-chainsafe-files-chainsafe-files-user-interface*:refs/remotes/origin/weblate-chainsafe-files-chainsafe-files-user-interface* +refs/tags/weblate-chainsafe-files-chainsafe-files-user-interface*:refs/tags/weblate-chainsafe-files-chainsafe-files-user-interface*
  The process '/usr/bin/git' failed with exit code 1
  Waiting 10 seconds before trying again
  /usr/bin/git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 origin +refs/heads/weblate-chainsafe-files-chainsafe-files-user-interface*:refs/remotes/origin/weblate-chainsafe-files-chainsafe-files-user-interface* +refs/tags/weblate-chainsafe-files-chainsafe-files-user-interface*:refs/tags/weblate-chainsafe-files-chainsafe-files-user-interface*
  The process '/usr/bin/git' failed with exit code 1
  Waiting 14 seconds before trying again
  /usr/bin/git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 origin +refs/heads/weblate-chainsafe-files-chainsafe-files-user-interface*:refs/remotes/origin/weblate-chainsafe-files-chainsafe-files-user-interface* +refs/tags/weblate-chainsafe-files-chainsafe-files-user-interface*:refs/tags/weblate-chainsafe-files-chainsafe-files-user-interface*
  Error: The process '/usr/bin/git' failed with exit code 1

Expected behavior
Checkout successful

Screenshots

Exception traceback

Server configuration and status

Weblate installation: weblate.org service

Weblate deploy checks

Additional context

@nijel
Copy link
Member

nijel commented Jun 28, 2021

Your pull request action is broken for pull requests from forks.

Removing the with for checkout action should fix that: https://github.com/ChainSafe/files-ui/blob/83b333da328c79f7f23686db3dfdcd500b62dd6d/.github/workflows/lint.yml#L8-L10

The github.event.pull_request.head.ref is name of the branch in the fork repository, and you are trying to fetch it from the main repository.

@nijel nijel added the question This is more a question for the support than an issue. label Jun 28, 2021
@github-actions
Copy link

This issue looks more like a support question than an issue. We strive to answer these reasonably fast, but purchasing the support subscription is not only more responsible and faster for your business but also makes Weblate stronger.

In case your question is already answered, making a donation is the right way to say thank you!

@Tbaut
Copy link
Author

Tbaut commented Jun 30, 2021

Thank you very much, this works

@Tbaut Tbaut closed this as completed Jun 30, 2021
@github-actions
Copy link

The issue you have reported is now resolved. If you don’t feel it’s right, please follow its labels to get a clue for further steps.

  • In case you see a similar problem, please open a separate issue.
  • If you are happy with the outcome, don’t hesitate to support Weblate by making a donation.

sreekanthreddybalne added a commit to sreekanthreddybalne/django-df-chat that referenced this issue May 18, 2023
At the checkout@v3 action, the error "The process '/usr/bin/git' failed with exit code 1" is thrown and the workflow fails.
According to WeblateOrg/weblate#6240, the fix for this is to remove the "with" block.
sreekanthreddybalne added a commit to sreekanthreddybalne/django-df-chat that referenced this issue May 18, 2023
At the checkout@v3 action, the error "The process '/usr/bin/git' failed with exit code 1" is thrown and the workflow fails.
According to WeblateOrg/weblate#6240, the fix for this is to remove the "with" block.
sreekanthreddybalne added a commit to sreekanthreddybalne/django-df-chat that referenced this issue May 19, 2023
At the checkout@v3 action, the error "The process '/usr/bin/git' failed with exit code 1" is thrown and the workflow fails.
According to WeblateOrg/weblate#6240, the fix for this is to remove the "with" block.
sreekanthreddybalne added a commit to sreekanthreddybalne/django-df-chat that referenced this issue May 19, 2023
At the checkout@v3 action, the error "The process '/usr/bin/git' failed with exit code 1" is thrown and the workflow fails.
According to WeblateOrg/weblate#6240, the fix for this is to remove the "with" block.
erinkcochran87 added a commit to dagster-io/dagster that referenced this issue Nov 21, 2023
## Summary & Motivation

This PR removes the `with` condition from the checkout step of the
Dagster University GitHub Action. Contributions from forked branches
caused the GitHub Action that deploys to Vercel to fail with the
following error ([example
logs](https://github.com/dagster-io/dagster/actions/runs/6895183205/job/18758590678)):

```
Run actions/checkout@v3
Syncing repository: dagster-io/dagster
Getting Git version info
Temporarily overriding HOME='/home/runner/work/_temp/3ad9168b-5e3d-484d-940f-b1398804d86f' before making global git config changes
Adding repository directory to the temporary git global config as a safe directory
/usr/bin/git config --global --add safe.directory /home/runner/work/dagster/dagster
Deleting the contents of '/home/runner/work/dagster/dagster'
Initializing the repository
Disabling automatic garbage collection
Setting up auth
Fetching the repository
  /usr/bin/git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/fix-weekly-partition-practice*:refs/remotes/origin/fix-weekly-partition-practice* +refs/tags/fix-weekly-partition-practice*:refs/tags/fix-weekly-partition-practice*
  The process '/usr/bin/git' failed with exit code 1
```

[This PR](WeblateOrg/weblate#6240) describes a
similar problem.

## How I Tested These Changes

I think we'll need to merge this before we can test it, but it's easy
enough to change back if there are issues.
adrolli added a commit to mooxphp/moox that referenced this issue Dec 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question This is more a question for the support than an issue.
Projects
None yet
Development

No branches or pull requests

2 participants