git -c diff.mnemonicprefix=false -c core.quotepath=false push -v origin
feature/xxx:feature/xxx
POST git-receive-pack (3470 bytes)
Pushing to http://xxx@stash/xxx.git
To http://stash/xxx.git
! [remote rejected] feature/xxx -> feature/xxx (unable to migrate objects
to permanent storage)
error: failed to push some refs to
'http://xxx@stash/xxx.git'
Completed with errors, see above.
Could someone explain how to go about troubleshooting this error? I've looked as some other similar questions but I can't find anything that helps work out why this push is being rejected- I literally updated the branch about half an hour earlier and wanted to push a new file I'd forgotten to include in the initial push. I've tried updating dev then switching back to the feature branch I'm working on as some comments suggested that git tries to update differences between other local branches and the remotes, but that hasn't done anything- I get exactly the same error message as before.
This unable to migrate objects to permanent storage
is typically the result of a configuration error on the server. In any case it's quite likely that nothing you do on your end will improve the result.
When a server receives a git push
, the receiving Git gets, from the sending side, a series of Git objects—commits, trees, blobs, and/or tags, all of which make up the content sent from whoever is doing the git push
. Then the sender delivers a request: *I'd like you, the receiver, to name these objects with some particular branch and/or tag names, so that they become accessible.*
In Git versions before 2.11.0, the objects immediately went into the receiver's object database. Then the receiver would inspect the suggested name creation or update (e.g., feature/xxx
should point to object 1234567...
), verify whether it was OK, and either do the update and reply OK, done or reject the update with a specific error, e.g., "not fast forward".
In Git version 2.11.0, the process has changed: incoming objects are placed in a "quarantine zone" until the name update(s) are accepted. Once the receiver verifies that updating feature/xxx
is OK, the receiver has to move the objects from the quarantine area into the object database. Once the move succeeds and the update is done, you get the OK, done reply from the server.
It's this movement, from quarantine zone within repository to repository object database, that is failing. In other words, there's nothing wrong with your push request. Instead, the server is saying: I would have done as you asked, but I've fallen over and cannot fix myself.
To fix the problem, whoever controls the server should log in to the machine and inspect the repository area, paying particular attention to file and directory ownership and permissions, disk quotas, and anything else that might affect this object migration process.
–
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.