actions / checkout

Action for checking out a repo
https://github.com/features/actions
MIT License
5.85k stars 1.73k forks source link

The process '/usr/bin/git' failed with exit code 1 #1326

Open agluszak opened 1 year ago

agluszak commented 1 year ago

For some reason git started failing on checkout after I enabled auto-commiting changes made by prettier

Fetching the repository
  /usr/bin/git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 origin +refs/heads/update/jsoniter-scala-core-2.23.0*:refs/remotes/origin/update/jsoniter-scala-core-2.23.0* +refs/tags/update/jsoniter-scala-core-2.23.0*:refs/tags/update/jsoniter-scala-core-2.23.0*
  The process '/usr/bin/git' failed with exit code 1
  Waiting 20 seconds before trying again
  /usr/bin/git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 origin +refs/heads/update/jsoniter-scala-core-2.23.0*:refs/remotes/origin/update/jsoniter-scala-core-2.23.0* +refs/tags/update/jsoniter-scala-core-2.23.0*:refs/tags/update/jsoniter-scala-core-2.23.0*
  The process '/usr/bin/git' failed with exit code 1
  Waiting 15 seconds before trying again
  /usr/bin/git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 origin +refs/heads/update/jsoniter-scala-core-2.23.0*:refs/remotes/origin/update/jsoniter-scala-core-2.23.0* +refs/tags/update/jsoniter-scala-core-2.23.0*:refs/tags/update/jsoniter-scala-core-2.23.0*

See: https://github.com/build-server-protocol/build-server-protocol/actions/runs/5003971723/jobs/8966282180#step:2:129

qxmips commented 1 year ago

I have same issue.

cwg50805 commented 1 year ago

Same :(

guychienll commented 1 year ago

I have same issue too !

ArjunDandagi commented 1 year ago

BUMP: we are seeing the same issue in our actions runner now

polytopes-design commented 8 months ago

Same

haooliveira84 commented 7 months ago

same here :(

kenorb commented 6 months ago
Fetching the repository
  /usr/bin/git -c protocol.version=2 fetch --no-tags --prune --no-recurse-submodules --depth=1 origin +refs/heads/v2.000-dev*:refs/remotes/origin/v2.000-dev* +refs/tags/v2.000-dev*:refs/tags/v2.000-dev*
  The process '/usr/bin/git' failed with exit code 1
  Waiting 20 seconds before trying again
  /usr/bin/git -c protocol.version=2 fetch --no-tags --prune --no-recurse-submodules --depth=1 origin +refs/heads/v2.000-dev*:refs/remotes/origin/v2.000-dev* +refs/tags/v2.000-dev*:refs/tags/v2.000-dev*
  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 --no-recurse-submodules --depth=1 origin +refs/heads/v2.000-dev*:refs/remotes/origin/v2.000-dev* +refs/tags/v2.000-dev*:refs/tags/v2.000-dev*
  ##[debug]Unsetting HOME override
  ::remove-matcher owner=checkout-git::
  ##[debug]Removed matchers: 'checkout-git'
  Error: The process '/usr/bin/git' failed with exit code 1
  ##[debug]Node Action run completed with exit code 1

The same error after dozens of re-runs.

Usage:

      - uses: actions/checkout@v4
        with:
          path: Include/EA31337-strategies
          ref: v2.000-dev
          repository: EA31337/EA31337-strategies
          submodules: recursive

I've tested actions/checkout@v3, didn't work either (same error).

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.

hieutomra commented 6 months ago

Same error and symptom for us. We are running with self-hosted runner. I tried to run the same command as the runner would and with export GIT_TRACE=1

[...]
09:45:10.394902 run-command.c:654       trace: run_command: GIT_DIR=.git git remote-https origin https://github.com/REDACTED
09:45:10.395717 git.c:745               trace: exec: git-remote-https origin https://github.com/REDACTED
09:45:10.395736 run-command.c:654       trace: run_command: git-remote-https origin https://github.com/REDACTED
Username for 'https://github.com': foo
Password for 'https://foo@github.com': 
09:45:22.693484 run-command.c:654       trace: run_command: git maintenance run --auto --no-quiet
09:45:22.694565 git.c:458               trace: built-in: git maintenance run --auto --no-quiet

$ echo $? 
1 
ElRojo commented 6 months ago

~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.

asombaty commented 5 months ago

I am having this issue for the past week now.

Olfi01 commented 5 months ago

I had the same problem and fixed it. In my case, the branch was still called master, but I was trying to checkout main.