I wanted to rename a branch in one of our (Git) repositories. The way to do this is to
This last step fails, like this:
> git push origin New_Branch_Name Counting objects: 1374, done. Delta compression using up to 12 threads. Compressing objects: 100% (145/145), done. Writing objects: 100% (478/478), 34.37 MiB | 8.36 MiB/s, done. Total 478 (delta 349), reused 455 (delta 332) remote: error: unable to write sha1 filename ./objects/pack/pack-c4fe98c613c55dc30b0e148d41c11a6fb68857ac.pack: Permission denied remote: fatal: cannot store pack file error: unpack failed: index-pack abnormal exit To http://stash/repo_address.git ! [remote rejected] New_Branch_Name -> New_Branch_Name (unpacker error) error: failed to push some refs to 'http://stash/repo_address.git'
[I can push to all the other repos on the server and all the other branches of this repo without problems.]
I tried the following:
None of these change the result.
The repo is a live one with quite many active users and a history of ~100 pull requests I cannot afford to lose, so deleting and re-pushing the whole repo is not an acceptable option (unless there is a way to migrate the PR's to the new copy).
Any suggestions for what could be wrong and how I could fix it?
I created a support request for this. The correct solution was to set <tt>core.createObject</tt> = <tt>link</tt> in the config of the server's bare repository.
Hi Balazs,
This post by slacy has similar symptoms:
http://slacy.com/blog/2009/09/git-error-unable-to-write-sha1-filename-permission-denied/
I'd try manually fixing the file as they suggest and setting the core.sharedRepository flag, if it isn't already.
What version of Stash are you using? Have you made any changes to the repository configuration on disk (outside of the Stash administration)?
cheers,
Tim
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As said above, I already looked at the permissions and there is nothing more to give. (Also, all the other randomly sampled packfiles I checked in this repo and others have exactly the same settings.)
I set core.sharedRepository to "all", it does not change the output.
We have Stash 3.0.4 (but this problem has been with us since 2.11 or 2.12), on Windows Server 2008 R2. This core.sharedRepository setting I changed now is the only thing I changed outside of the web UI.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Tim, Do you have any other suggestions?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi again Balazs,
Sorry for the delay. I must admit I haven't seen anything like this before. At this point I'd contact our support team at https://support.atlassian.comso we can take a closer look at your Stash configuration and repository.
cheers,
Tim
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What was the fix in the end for this? I think I have the same problem. I'm using Stash v3.8.0.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.