-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
The process '/usr/bin/git' failed with exit code 1 #1326
Comments
I have same issue. |
Same :( |
I have same issue too ! |
BUMP: |
Same |
same here :( |
The same error after dozens of re-runs. Usage:
I've tested It's possible that I'm cloning git repository on top of another cloned repository and there is some kind of confusion? Update: I've refactored my actions by moving checkout of each repo into separate jobs then upload source code files as artifact, then download it from another one. This workaround worked for me. |
Same error and symptom for us.
|
~I'm also having this issue. The ref is a tag and it works on some tags, but not on others. ~ edit: branch didn't exist in my case. |
I am having this issue for the past week now. |
I had the same problem and fixed it. In my case, the branch was still called master, but I was trying to checkout main. |
I am currently facing this issue with two actions: Prettier actionname: Prettier
on:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
format:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/[email protected]
with:
ref: ${{ github.head_ref }}
- name: Run Prettier
uses: AbdulRehman-1/pr-prettier@initial
with:
only_changed: true
prettier_options: --write **/*.{css,html,js,json,liquid,md,scss,yaml,yml} format my data filesname: Sort data files
on:
push:
branches:
- main
paths:
- "_data/**"
pull_request:
paths:
- "_data/**"
workflow_dispatch:
jobs:
sort-data:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/[email protected]
with:
ref: ${{ github.head_ref }}
- name: Get changed data files
id: changed-data
uses: tj-actions/[email protected]
with:
files: _data/**.yml
- name: Setup Python
if: steps.changed-data.outputs.any_changed == 'true'
uses: actions/[email protected]
with:
python-version: "3.12"
- name: Sort data files
if: steps.changed-data.outputs.any_changed == 'true'
env:
ALL_CHANGED_FILES: ${{ steps.changed-data.outputs.all_changed_files }}
run: |
for file in $ALL_CHANGED_FILES; do
echo "Formatting $file"
python3 format_data.py -f $file
done
# commit all changed files back to the repository
- uses: stefanzweifel/[email protected]
if: steps.changed-data.outputs.any_changed == 'true'
with:
commit_message: Sort data files
|
This looks to be an issue with the branch the PR references is not available (doesn’t exist) in the repository. |
But this doesn't make sense. I am even using the changes suggested in the docs with:
ref: ${{ github.head_ref }} And the branch exists in my fork: https://github.com/george-gca/diciotech/tree/jekyll2 How should I configure it then? |
For some reason git started failing on checkout after I enabled auto-commiting changes made by prettier
See: https://github.com/build-server-protocol/build-server-protocol/actions/runs/5003971723/jobs/8966282180#step:2:129
The text was updated successfully, but these errors were encountered: