-
Notifications
You must be signed in to change notification settings - Fork 298
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
remote: fatal: did not receive expected object on Pull request #110
Comments
Is it a public repo? Do you have a link to the action output? (it's easier to see some more variables and information on the origin and destination checking the commits). Thanks! |
This is a private repository |
I've found at least one place (https://github.com/orgs/Homebrew/discussions/666#discussioncomment-1228144) that mentions that it happened when using https protocol instead of using ssh. In the docs: Would you be able to try setting it up with the SSH deploy keys? (https://cpina.github.io/push-to-another-repository-docs/setup-using-ssh-deploy-keys.html#setup-ssh-deploy-keys) It would be good to know if it still fails... |
I have set it up using ssh keys and it is working fine when we push the code directly to a |
Before I give too many non-relevant details, do you mean that the action works fine when you push into develop in the source repository and then the action pushes it into the target repository? but does not work fine if a PR is involved? Or that it works fine if you push from your computer to the target repository? What I want to suggest... could you try reproducing locally the error reading the action and following what it does (https://github.com/cpina/github-action-push-to-another-repository/blob/main/entrypoint.sh). I can give better directions if needed. |
Yess, it always works fine when we push the code directly to any branch in the source repository. Actions runs successfully when we push to the branch but it does not work when PR is involved. I am using https://github.com/nektos/act to run GitHub actions locally which runs fine. I also tried to fork the repo and tried to push the code forcefully from the GitHub actions the error still persists. |
My only idea at the moment is that, since you already did:
Perhaps you can add "set -x" at the beginning of entrypoint.sh to see the exact commands executed. And then try to execute them by hand and see if it fails / debug it checking step by step / modifying? Perhaps try removing the "--depth 1" and see if this is causing the problem? (there were some problems in the past in git but I thought that are all solved...) entrypoint.sh is moving .git folder but I don't see how this would cause an issue only for you. Is the remote repository changed remotely but another process at the same time as the action is running? Or, can you think what's happening when a PR is involved that is not happening when a PR is not involved? Sorry for the general ideas and no concrete steps / fixes! |
The documentation might have information on what you could do to fix the problem.
nothing to commit, working tree clean
[+] git diff-index:
HEAD is now at f3c871d Merge pull request #137 from codeupscale/adnanmayo-patch-1
[+] Pushing git commit
error: Could not read a324db98bb4b38eec087243ba042fdfd87cc0fde
remote: fatal: did not receive expected object 624df496fd4e79b58305f0fb444526231a74353b
error: remote unpack failed: index-pack failed
To github.com:adnanmayo/autoupscale-frontend-nextjs.git
! [remote rejected] develop -> develop (failed)
Full output might contain useful information including the git command, git output and settings used. It also helps to search for the problem later on.
URL to the execution
This action works fine when we push directly to a certain branch but I am receiving the above error when there is a pull request.
The text was updated successfully, but these errors were encountered: