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 on checkout from empty repository #746

Open
andry81 opened this issue Apr 2, 2022 · 1 comment
Open

Error on checkout from empty repository #746

andry81 opened this issue Apr 2, 2022 · 1 comment

Comments

@andry81
Copy link

andry81 commented Apr 2, 2022

Seems v2 and v3 could not handle empty repository:

Fetching the repository
  /usr/bin/git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 origin +refs/heads/master*:refs/remotes/origin/master* +refs/tags/master*:refs/tags/master*
  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/master*:refs/remotes/origin/master* +refs/tags/master*:refs/tags/master*
  The process '/usr/bin/git' failed with exit code 1
  Waiting 13 seconds before trying again
  /usr/bin/git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 origin +refs/heads/master*:refs/remotes/origin/master* +refs/tags/master*:refs/tags/master*
  Error: The process '/usr/bin/git' failed with exit code 1

May be needs to check the remote on reference existence before fetch it?

@andry81
Copy link
Author

andry81 commented Apr 16, 2022

There is an extension to this action script with additional features which does use mkdir + git init if a remote repository exists but has no any branch reference: https://github.com/andry81-devops/gh-action--git-checkout

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant