Remote error unpack failed unpack objects abnormal exit

I'm using remote git repository. I successfully commit my files and now I'm trying to push it up to stream. Operation fails with this messasge: git.exe push --progress "origin" master:master er...

I’m using remote git repository. I successfully commit my files and now I’m trying
to push it up to stream.

Operation fails with this messasge:

git.exe push --progress  "origin" master:master

error: unpack failed: unpack-objects abnormal exit
error: RPC failed; result=18, HTTP code = 200

I use TortoiseGit client on Windows 7.

Why am I getting this message? how to recover from this state?

Ben James's user avatar

Ben James

119k26 gold badges192 silver badges155 bronze badges

asked Dec 9, 2011 at 8:07

vlcik's user avatar

1

If your git repo is self hosted, check the file system rights on the remote git directory. If this gets corrupted, it is possible that your git server just doesn’t have rights.

For instance, I host my own gitosis system on Ubuntu server. When I create the git repo on the server, I run sudo git init --bare <repo name> I then have to run sudo chgrp -R gitosis <repo name> && sudo chown -R gitosis <repo name>.

answered Aug 8, 2012 at 19:23

sean_m's user avatar

sean_msean_m

1,5441 gold badge12 silver badges14 bronze badges

1

According to this article git repack remote/origin/master might help in case your local repository was corrupted. To check that you can try cloning your remote repo into new directory and test push from it.

answered Dec 9, 2011 at 8:20

KL-7's user avatar

KL-7KL-7

45k9 gold badges86 silver badges74 bronze badges

2

This also occurs when the remote has no space left on it, try free up some space.

answered Jun 1, 2014 at 9:09

tread's user avatar

treadtread

9,69917 gold badges90 silver badges158 bronze badges

Do check the permissions on the remote/origin repository. Are they writeable by the git user? If not, you will get this error. Something like:

chown git_user.git_user -R /path/to/repo/your_funky_repo

should do the trick on *nix systems. If your remote is on windows, I am sure there’s something equivalent you could run.

answered Apr 29, 2015 at 7:41

Sardathrion - against SE abuse's user avatar

1

I encountered this problem when I set up a fresh remote server and created the remote git repo/folders with my root user (rather than my personal user acct). Problem fixed by deleting the git repos and redoing them with my personal account. all works as expected now.

answered Dec 13, 2015 at 1:15

wkd's user avatar

wkdwkd

2311 gold badge4 silver badges16 bronze badges

I’ve run into the same trouble when I changed my git from VPN to https connection.

Something happend in my git Repository and I couldn’t push anymore, but pull still worked. I also tried the Solution with git -repack remote/origin/master, but still same Issue.

To solve this, I just made a new clone from my repo with the new connection and was able to use push methods as known. I don’t know really why this couldn’t be solved by git -repack, but in this way it works for sure!

I guess there was something that doesn’t fit with the VPN remote settings for the Server as I changed the access method to https.

Hope this helps.

answered Feb 2, 2015 at 16:22

Gkiokan's user avatar

GkiokanGkiokan

3,4322 gold badges21 silver badges24 bronze badges

1

Also check if your disk is not full. I ran into the same problem on one of my VPS few minutes ago.

Makoto's user avatar

Makoto

103k27 gold badges189 silver badges224 bronze badges

answered Apr 18, 2013 at 21:43

JakubKnejzlik's user avatar

JakubKnejzlikJakubKnejzlik

6,2333 gold badges38 silver badges40 bronze badges

On Windows, the only fix that worked for me was to remove the following lines from my .gitconfig file:

[credential]
helper = !'C:\Users\YourNameHere\AppData\Roaming\GitCredStore\git-credential-winstore.exe'

Once I did that, I manually pushed once (successfully), then added the above lines back to .gitconfig, and everything worked.

answered Jul 6, 2015 at 23:58

Noah Heldman's user avatar

Noah HeldmanNoah Heldman

6,6743 gold badges39 silver badges40 bronze badges

On my (gitlab) server, I needed first to chown -R git:git repositories/ , but git repack did not work. The issue was solved when I used scp to copy the object file from my local repo to the server:

    scp .git/objects/0d/449dd91d8c20c1820d1284371b28637e08a0f3 root@server:/home/git/repositories/my/project.git/objects/0d/

answered Feb 6, 2017 at 22:45

PHZ.fi-Pharazon's user avatar

If you use a HTTP URL, you cannot push data via HTTP. HTTP is for read only access. Use ssh instead.

Do git remote -v to check if your repository URL is a HTTP one.
You can change this URL by doing this git remote set-url origin ssh:user@server/dir/project.git

After that, you can push!

answered Mar 1, 2017 at 15:00

zatenzu's user avatar

zatenzuzatenzu

3472 silver badges10 bronze badges

I successfully pushed it using «git push —no-thin origin HEAD«

Sometimes when we execute git push to push a new branch to a remote repository, it will be blocked by the remote repository.

Maybe we don’t have the appropriate permissions. However, when I add the --no-thin parameter to git push, I can push it up.

However, this command may be affected by different levels of permissions, so there is no guarantee that it will be pushed. But I succeeded with this push.

Alien's user avatar

Alien

14.6k6 gold badges38 silver badges56 bronze badges

answered Aug 9, 2018 at 6:58

hao wangg's user avatar

In my case, the remote repo was a shallow clone. I was pushing a merge commit which apparently was using commits dated before the earliest commit the shallow repo had.

To fix this you need to unshallow the remote:

git fetch --unshallow

answered Sep 27, 2018 at 10:29

Okneloper's user avatar

OkneloperOkneloper

1,2391 gold badge13 silver badges24 bronze badges

Содержание

  1. Remote unpack failed: unpack-objects abnormal exit #13203
  2. Comments
  3. Description
  4. Bitbucket Support
  5. Knowledge base
  6. Products
  7. Jira Software
  8. Jira Service Management
  9. Jira Work Management
  10. Confluence
  11. Bitbucket
  12. Resources
  13. Documentation
  14. Community
  15. Suggestions and bugs
  16. Marketplace
  17. Billing and licensing
  18. Viewport
  19. Confluence
  20. Error: Unpack Failed: Unpack-objects Abnormal Exit
  21. Related content
  22. Still need help?
  23. Symptoms
  24. Diagnosis
  25. Cause
  26. Resolution
  27. Error 500 — error: remote unpack failed: unpack-objects abnormal exit #3373
  28. Comments
  29. Description
  30. Resolving Network-Related Errors for Git
  31. 1. failed to write object error: remote unpack failed: unpack-objects abnormal exit
  32. 2. unable to get local issuer certificate
  33. 3. early EOF fatal: index-pack failed
  34. 4. the remote end hung up unexpectedly fatal: index-pack failed
  35. Conclusion
  36. How to Fix Git Push Insufficient Permission Error for Objects Permanently
  37. Set the Appropriate Permissions on Objects Directory
  38. Share the Git Repository with a Group

Remote unpack failed: unpack-objects abnormal exit #13203

  • Gitea version (or commit ref): 1.12.4
  • Git version: 2.28.0
  • Operating system: Linux
  • Go version: 1.15.3
  • Database (use [x] ):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
  • Log gist:
    I have not found any errors in gitea.log.

Description

After updating Gitea from 1.12.1 to 1.12.4 I am unable to push changes. Everytime I try to do that I got the following error:

Enter passphrase for key ‘/path/to/.ssh/id_rsa’:
Enumerating objects: 29, done.
Counting objects: 100% (29/29), done.
Delta compression using up to 16 threads
Compressing objects: 100% (14/14), done.
Writing objects: 100% (15/15), 5.13 KiB | 5.13 MiB/s, done.
Total 15 (delta 13), reused 3 (delta 1), pack-reused 0
remote: fatal: not a git repository: ‘.’
error: remote unpack failed: unpack-objects abnormal exit
To ssh://git.com:9999/group/repo.git
! [remote rejected] master -> master (unpacker error)
error: failed to push some refs to ‘ssh://git.com:9999/group/repo.git’

This happens to all repositories hosted at Gitea. I tried to launch git fsck on server side and found no errors. I can clone repository, browse it via webui, etc, just cannot push changes back to remote.
I am pretty sure, you will need some additional data. Please let me know what I can do in order to investigate this.

The text was updated successfully, but these errors were encountered:

@belliash do you use the build in ssh server?

Yes, I use ssh server that is built into gitea, listening on custom port.
In logs I found just this:

2020/10/18 21:49:43 modules/ssh/ssh.go:63:sessionHandler() [T] SSH: Payload: git-receive-pack ‘/group/repo.git’
2020/10/18 21:49:43 modules/ssh/ssh.go:66:sessionHandler() [T] SSH: Arguments: [serv key-5 —config=/path/to/app.ini]

There are also some SQL queries like:
SELECT id , owner_id , name , fingerprint , content , mode , type , login_source_id , created_unix , updated_unix FROM public_key WHERE (content like ?) LIMIT 1

and permissions loaded:
2020/10/18 21:49:44 . s/repo_permission.go:154:func1() [T] Permission Loaded for 1:user in 41:group/repo:
Permissions: AccessMode: 4:owner, 5 Units, 0 UnitsMode(s): [
Units[0]: ID: 281 RepoID: ? Type: 1:UnitTypeCode Config: <>
Units[1]: ID: 326 RepoID: ? Type: 2:UnitTypeIssues Config: <«EnableTimetracker»:false,»AllowOnlyContributorsToTrackTime»:false,»EnableDependencies»:true>
Units[2]: ID: 327 RepoID: ? Type: 3:UnitTypePullRequests Config: <«IgnoreWhitespaceConflicts»:false,»AllowMerge»:true,»AllowRebase»:true,»AllowRebaseMerge»:true,»AllowSquash»:true>
Units[3]: ID: 282 RepoID: ? Type: 4:UnitTypeReleases Config: <>
Units[4]: ID: 325 RepoID: ? Type: 5:UnitTypeWiki Config: <> ]
2020/10/18 21:49:44 . ters/private/serv.go:363:ServCommand() [D] Serv Results:
IsWiki: false
IsDeployKey: false
KeyID: ? KeyName: user@host
UserName: user
UserID: ?
OwnerName: group
RepoName: repo
RepoID: ?

I obfuscated logs from some sensitive data.

I have just found out that I cannot edit files online via web interface, because I got another error:

I checked permissions and they look ok. I can write under that path as well as git user. On the other hand setting chmod recursively to 777 does not resolve this.

The second problem looks somehow similar to #12085 except I got xattr enabled. I wonder if both are connected.

Источник

Bitbucket Support

Knowledge base

Products

Jira Software

Project and issue tracking

Jira Service Management

Service management and customer support

Jira Work Management

Manage any business project

Confluence

Bitbucket

Git code management

Resources

Documentation

Usage and admin help

Answers, support, and inspiration

Suggestions and bugs

Feature suggestions and bug reports

Marketplace

Billing and licensing

Frequently asked questions

Viewport

Confluence

Error: Unpack Failed: Unpack-objects Abnormal Exit

Related content

Still need help?

The Atlassian Community is here for you.

Symptoms

Trying to GIT push to remote repository gets to the following error (in command prompt/terminal)

Diagnosis

  1. Single user failed to push to remote repository. See #1 cause and resolution.
  2. Multiple users failed to push to remote repository. See #2 cause and resolution.

Cause

  1. The local repository may be corrupted. See #1 resolution.
  2. Disk space in the server hosting Bitbucket Server is full. See #2 resolution.

Resolution

The following resolution shown are referring to the respective cause above.

  1. To verify that the local repository is corrupted, you can clone your remote repository to another new directory and then push again. Running git repack might help in case the local repository is indeed corrupted.
  2. If disk space is indeed full for Bitbucket Server, clear them and push again.

Источник

Error 500 — error: remote unpack failed: unpack-objects abnormal exit #3373

  • Gitea version (or commit ref): 1.3.2
  • Git version: 2.15.0
  • Operating system: debian-like (containers by nanobox.io)
  • Database (use [x] ):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:
    2018/01/15 15:44:06 [. routers/repo/repo.go:123 handleCreateError()] [E] CreatePost: initRepository: initRepoCommit: git push: remote: fatal: error when closing sha1 file: Permission denied
    error: remote unpack failed: unpack-objects abnormal exit
    To /app/repositories/my-company/my-project.git
    ! [remote rejected] master -> master (unpacker error)
    error: failed to push some refs to ‘/app/repositories/my-company/my-project.git’

Description

After a fresh installation, when our fist repository is created, there is an error 500.
This seems to be a permission problem, and we surely need to set the access/write rights inside our Docker-like container (nanobox use Docker but we can’t directly use docker image).
We’ve set theses folders r/w access:

We can found a new folder « repositories/my-company/ » created, so there is no problem to write inside this folder. We can also run « git » command without any problem.

Could you tell me the exact shell command that Gitea try to execute please? There is surely missing rights somewhere.

Thanks
.
PS: BTW, I could share the « boxfile.yml » configuration file when all is ok, to help other nanobox users to install Gitea in few seconds.

The text was updated successfully, but these errors were encountered:

Источник

If you are a developer, I am sure you heavily depend on VCS (version control systems) to maintain versions of new features with the flexibility to add, merge, and revert changes.

Git is an integral part of a developer’s life. But, unfortunately, errors and failures are imminent when you immensely depend on something.

The tough part is a lot of research is involved in finding a quick and relevant solution. I know this from personal experience.

So, I thought I could try and make it a little less painful by curating some of the most common git network-related errors that one can encounter and see how to fix them easily.

Let’s note some of the troublesome network-related git errors:

  1. failed to write object error: remote unpack failed: unpack-objects abnormal exit
  2. unable to get local issuer certificate
  3. early EOF fatal: index-pack failed
  4. the remote end hung up unexpectedly fatal: index-pack failed

The errors mentioned above are some of the common ones that occur. So let’s find out how to fix them.

1. failed to write object error: remote unpack failed: unpack-objects abnormal exit

This error message might scare you. But trust me, the error is quite common when your git local and remote versions are constantly getting appended with new commits.

This error might occur either if your local repo is corrupted or your remote repo space is exhausted.

We have more than one way to fix this.

Fix 1- git-repack: Create a new directory, clone the errored repo, repack, and push.

Pack is a collection of individual delta compressed objects with an associated index stored in a single file.

Repack is used to combine all objects that do not currently reside in a “pack” into a pack.

git repack -a -d -f — depth=250 — window=250

Fix 2- Free up space in a remote repo or buy more space.

2. unable to get local issuer certificate

Configuration is the key to getting better results. When something is misconfigured, you might end up with errors that are hard to trace or fix.

When working with any REST service, an HTTPS handshake is mandated at both the client and the server to establish a secure connection for communication. If the SSL certificate cannot be verified, git cannot complete the HTTPS handshake with the server that hosts the repository. This is when the unable to get local issuer certificate error occurs.

Fix 1- Add the certificate to the trusted certificate store.

On Windows, go to trusted certificate store located at:

Modify ca-bundle.crt by pasting the git SSL certificate to the end of the file. After this, you can perform git pull, push, or clone commands.

Fix 2- Disable SSL certificate validation (not recommended)

Disable the git SSL certificate validation locally.

git -c http.sslVerify=false clone [URL]

You can also disable SSL certificate validation at a global level.

git config — global http.sslVerify false

To re-enable SSL certificate validation, use the following command:

git config — global http.sslVerify false

Fix 3- Reinstall git and choose the SSL transport backend option during the installation process.

3. early EOF fatal: index-pack failed

This error comes up when you are trying to clone a repo from one machine by connecting to the remote server and running the fetch command from another machine due to the memory needs of git.

Fix 1- To truncate the amount of info coming down, you should first turn off compression and do a partial clone. Then, when that works, go into the new directory and retrieve the rest of the clone:

#turn off compression
git config — global core.compression 0
#perform partial clone
git clone — depth 1
#fetch and complete the clone
git fetch — unshallow

Fix 2- Modify your global git configuration file, which is .gitconfig in $USER_HOME.

packedGitLimit = 512m
packedGitWindowSize = 512m
[pack]
deltaCacheSize = 2047m
packetSizeLimit = 2047m
windowMemory = 2047m

4. the remote end hung up unexpectedly fatal: index-pack failed

When trying to clone or fetch a repo, this error might come up if you are under a corporate network or VPN or if Nginx is configured as a reverse proxy.

Fix 1- Disable the anti-virus settings, firewall settings, or VPN client so that the connection can bypass the error.

Fix 2- Change the default value of temp file size in .gitconfig.

Syntax: proxy_max_temp_file_size size;
Default:
Proxy_max_temp_file_size 1024m;
Context: http, server, location

Conclusion

When working on project deadlines, git errors can be a nightmarish roadblock as they require hours of your time troubleshooting and finding a fix. As we all choose to work with our preferred OSs and configurations, solutions that worked for me might not work in your case. There are many underlying factors, and there will always be more than one fix to recover from your state and proceed.

I hope this article will help you with your errors and get back on your development track.

Источник

How to Fix Git Push Insufficient Permission Error for Objects Permanently

Sometimes when you do a git push, you might get the following permission error message.

This error typically happens when multiple users are working on a particular git repository.

The following git push error indicates that it doesn’t have enough permission for adding a new object to the ./objects directory under your repository.

Apart from the obvious permission issue, there is also another underlying problem that needs to be addressed, which is explained in this tutorial.

It also shows that the git unpack failed with unpack-objects abnormal exit. Because of this error, it failed to push some refs as shown above.

First, cd to the git repository which is having this issue. If you don’t see the objects directory directly under your repository folder, then look under the .git folder as shown below.

In this particular case, when john is trying to do ‘git push’, he is getting the above error because some of the directories under the objects folder of git repository are owned by lisa as shown below.

Set the Appropriate Permissions on Objects Directory

To solve this problem, execute the following, which will set the group to git (or whatever group where all the users belongs to. Also make sure the user and group has read and write permission to the directory.

  • Make sure all your users who need access to git are part of the git group. Change the “git” in the above chgrp command to whatever group where all your developers belong to.
  • The “s” option in the “g+rws” is to set the setuid bit on the objects folder. This will make sure any new directory created under objects folder will make the group name from the objects folder which is owned by git group.

You may be tempted to execute the following on your objects directory, which will solve the problem that you are having. But, as you can imagine, it is not a good idea to do 777. Instead execute the above chgrp and chmod command.

But, even after doing the above, the same problem might return again, and you may have to do the above chgrp and chmod whenever the problem occurs.

So, apart from fixing the permission error as explained above, we also need to fix the underlying problem.

In this case, the git repository (for example: myproj) is not setup as shared repository for groups. It might just be a bare repository.

If it is not setup as shared repository, you’ll see the above “insufficient permission on objects directory” issue starts to show-up again.

To verify whether your repository is already setup for group sharing, do the following git config -l option inside your git repository that has the problem.

In the above output, we don’t see a parameter called “core.sharedrepository”. So, this particular repository (i.e myproj is not setup as shared repository).

The above command displays the configuration values from the “config” file that is located under your git repository.

The above is setup as a bare repository. To convert a bare repository to shared repository, do the following:

Note: In the above command, don’t replace the keyword “group” with your groupname (for example: git). Use the above above command exactly as shown without changing anything. The “group” in the above command should be typed exactly as it is.

Now, if you view the git config as shown below, you’ll see the “core.sharedrepository” parameter set to group.

The above will solve the insufficient permission issue permanently.

After you set the sharedrepository, if you view the config file under your git repository, you’ll notice that the value of sharedrepository parameter is set to 2 (which is group) as shown below.

Источник

Sometimes when you do a git push, you might get the following permission error message.

This error typically happens when multiple users are working on a particular git repository.

The following git push error indicates that it doesn’t have enough permission for adding a new object to the ./objects directory under your repository.

Apart from the obvious permission issue, there is also another underlying problem that needs to be addressed, which is explained in this tutorial.

$ git push
counting objects: 6, done.
Delta compression using upto 4 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (4/4), 388 bytes, | 0 bytes/s, done.
Total: 4 (delta 1), reused 0 (delta 0)

error: insufficient permission for adding an object to repository database ./objects
fatal: failed to write object
error: unpack failed: unpack-objects abnormal exit
 ! [remote rejected] master -> master (n/a (unpacker error))
error: failed to push some refs to john@192.168.100.1:/home/git/myproj

It also shows that the git unpack failed with unpack-objects abnormal exit. Because of this error, it failed to push some refs as shown above.

First, cd to the git repository which is having this issue. If you don’t see the objects directory directly under your repository folder, then look under the .git folder as shown below.

[john@devdb]$ cd /home/git/myproj
(or)
[john@devdb]$ cd /home/git/myproj/.git

In this particular case, when john is trying to do ‘git push’, he is getting the above error because some of the directories under the objects folder of git repository are owned by lisa as shown below.

[john@devdb]$ ls -l objects
drwxr-xr-x 2 john  git 4096 Oct  8  2016 01
drwxr-xr-x 2 john  git 4096 Oct  8  2016 02
drwxr-xr-x 2 lisa lisa 4096 Oct  8  2016 03
drwxr-xr-x 2 lisa lisa 4096 May  1  2017 04
drwxr-xr-x 2 john  git 4096 May  1  2017 05
drwxr-xr-x 2 john  git 4096 May  6  2017 06

Set the Appropriate Permissions on Objects Directory

To solve this problem, execute the following, which will set the group to git (or whatever group where all the users belongs to. Also make sure the user and group has read and write permission to the directory.

cd /your/git/repo

chgrp -R git objects

chmod -R g+rws objects

In the above:

  • Make sure all your users who need access to git are part of the git group. Change the “git” in the above chgrp command to whatever group where all your developers belong to.
  • The “s” option in the “g+rws” is to set the setuid bit on the objects folder. This will make sure any new directory created under objects folder will make the group name from the objects folder which is owned by git group.

You may be tempted to execute the following on your objects directory, which will solve the problem that you are having. But, as you can imagine, it is not a good idea to do 777. Instead execute the above chgrp and chmod command.

chmod -R 777 objects

Share the Git Repository with a Group

But, even after doing the above, the same problem might return again, and you may have to do the above chgrp and chmod whenever the problem occurs.

So, apart from fixing the permission error as explained above, we also need to fix the underlying problem.

In this case, the git repository (for example: myproj) is not setup as shared repository for groups. It might just be a bare repository.

If it is not setup as shared repository, you’ll see the above “insufficient permission on objects directory” issue starts to show-up again.

To verify whether your repository is already setup for group sharing, do the following git config -l option inside your git repository that has the problem.

$ cd /home/git/myproj

$ git config -l
user.name=John Smith
user.email=john@thegeekstuff.com
core.repositoryformatversion=0
core.filemode=true
core.bare=true
core.logallrefupdates=true

In the above output, we don’t see a parameter called “core.sharedrepository”. So, this particular repository (i.e myproj is not setup as shared repository).

The above command displays the configuration values from the “config” file that is located under your git repository.

$ cd /your/git/repo

$ cat config 
[core]
        repositoryformatversion = 0
        filemode = true
        bare = true
        logallrefupdates = true

The above is setup as a bare repository. To convert a bare repository to shared repository, do the following:

git config core.sharedRepository group

Note: In the above command, don’t replace the keyword “group” with your groupname (for example: git). Use the above above command exactly as shown without changing anything. The “group” in the above command should be typed exactly as it is.

Now, if you view the git config as shown below, you’ll see the “core.sharedrepository” parameter set to group.

$ git config -l
user.name=John Smith
user.email=john@thegeekstuff.com
core.repositoryformatversion=0
core.filemode=true
core.bare=true
core.logallrefupdates=true
core.sharedrepository=group

The above will solve the insufficient permission issue permanently.

After you set the sharedrepository, if you view the config file under your git repository, you’ll notice that the value of sharedrepository parameter is set to 2 (which is group) as shown below.

$ cat config 
[core]
        repositoryformatversion = 0
        filemode = true
        bare = true
        sharedrepository = 2
[receive]
        denyNonFastforwards = true

Also, anytime you make a git repository as sharedrepository for group using the above command, it will also set the receive.denyNonFastforwards to true automatically as shown above.

Я использую удаленный репозиторий git. Я успешно фиксирую свои файлы и теперь пытаюсь отправить их в поток.

Сбой операции с этим сообщением:

git.exe push --progress  "origin" master:master

error: unpack failed: unpack-objects abnormal exit
error: RPC failed; result=18, HTTP code = 200

Я использую клиент TortoiseGit в Windows 7.

Почему я получаю это сообщение? как выйти из этого состояния?

12 ответы

Если ваше репозиторий git размещается самостоятельно, проверьте права файловой системы в удаленном каталоге git. Если он будет поврежден, возможно, ваш сервер git просто не имеет прав.

Например, я размещаю свою собственную систему gitosis на сервере Ubuntu. Когда я создаю репозиторий git на сервере, я запускаю sudo git init --bare <repo name> Тогда мне нужно бежать sudo chgrp -R gitosis <repo name> && sudo chown -R gitosis <repo name>.

ответ дан 08 авг.

Согласно информации это гайд git repack remote/origin/master может помочь в случае повреждения вашего локального репозитория. Чтобы убедиться, что вы можете попробовать клонировать удаленное репо в новый каталог и протестировать push из него.

ответ дан 09 дек ’11, 08:12

Это также происходит, когда на пульте дистанционного управления не остается места, попробуйте освободить место.

Создан 01 июн.

У меня возникла та же проблема, когда я изменил свой git с VPN на https-соединение.

Что-то случилось в моем репозитории git, и я больше не мог нажимать, но тяга все еще работала. Я также пробовал Решение с git -repack remote/origin/master, но все же проблема.

Чтобы решить эту проблему, I just made a new clone from my repo with the new connection и мог использовать известные методы push. Я действительно не знаю, почему это не может быть решено с помощью git -repack, но таким образом он точно работает!

Я предполагаю, что было что-то, что не соответствовало удаленным настройкам VPN для сервера, поскольку я изменил метод доступа на https.

Надеюсь это поможет.

Создан 02 фев.

Проверьте разрешения в удаленном / исходном репозитории. Могут ли они записываться пользователем git? В противном случае вы получите эту ошибку. Что-то вроде:

chown git_user.git_user -R /path/to/repo/your_funky_repo

должен работать в системах * nix. Если ваш пульт находится в Windows, я уверен, что вы могли бы запустить что-то эквивалентное.

ответ дан 29 апр.

Я столкнулся с этой проблемой, когда настроил новый удаленный сервер и создал удаленные репозитории / папки git с моими root user (а не мой личный аккаунт пользователя). Проблема устранена удалением репозиториев git и повторным их повторением с моей личной учетной записью. теперь все работает как положено.

ответ дан 13 дек ’15, 01:12

Также проверьте, не заполнен ли ваш диск. Несколько минут назад я столкнулся с той же проблемой на одном из моих VPS.

Создан 23 фев.

В Windows единственное исправление, которое сработало для меня, — это удалить следующие строки из моего файла .gitconfig:

[credential]
helper = !'C:\Users\YourNameHere\AppData\Roaming\GitCredStore\git-credential-winstore.exe'

Как только я это сделал, я вручную нажал один раз (успешно), затем добавил приведенные выше строки обратно в .gitconfig, и все сработало.

Создан 07 июля ’15, 00:07

На моем (gitlab) сервере мне сначала нужно было chown -R git: git repositories /, но git repack не работал. Проблема была решена, когда я использовал scp для копирования объектного файла из локального репо на сервер:

    scp .git/objects/0d/449dd91d8c20c1820d1284371b28637e08a0f3 root@server:/home/git/repositories/my/project.git/objects/0d/

Создан 06 фев.

Если вы используете URL-адрес HTTP, вы не можете передавать данные через HTTP. HTTP предназначен только для чтения. Вместо этого используйте ssh.

Do git remote -v чтобы проверить, является ли URL-адрес вашего репозитория HTTP-адресом. Вы можете изменить этот URL, выполнив следующие действия. git remote set-url origin ssh:user@server/dir/project.git

После этого можно нажимать!

ответ дан 01 мар ’17, в 15:03

Я успешно протолкнул его, используя «git push —no-thin origin HEAD«

Иногда, когда мы выполняем git push, чтобы отправить новую ветку в удаленный репозиторий, она блокируется удаленным репозиторием.

Может у нас нет подходящего Разрешения. Однако, когда я добавляю --no-thin параметр для git push, я могу поднять его.

Однако на эту команду могут влиять разные уровни разрешений, поэтому нет гарантии, что она будет отправлена. Но мне это удалось.

ответ дан 09 авг.

В моем случае удаленное репо было мелким клоном. Я подталкивал коммит слияния, который, по-видимому, использовал коммиты, датированные до самого раннего коммита, который имел неглубокий репо.

Чтобы исправить это, вам нужно разблокировать пульт:

git fetch --unshallow

Создан 27 сен.

Не тот ответ, который вы ищете? Просмотрите другие вопросы с метками

git
version-control

or задайте свой вопрос.

This problem is getting weirder.

My original post follows, but here is the new thing I discovered:

I executed

git push

and it gave me its usual error:

Counting objects: 9, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (5/5), done.
Writing objects: 100% (5/5), 588 bytes, done.
Total 5 (delta 4), reused 0 (delta 0)
remote: error: unable to create temporary file: No such file or directory
remote: fatal: failed to write object
error: unpack failed: unpack-objects abnormal exit
To USER@REMOTE:/git/PROJECT.git
 ! [remote rejected] master -> master (unpacker error)
error: failed to push some refs to 'USER@REMOTE:/git/PROJECT.git'

So being overly optimistic, I thought maybe the «—verbose» option would give me some details, so I immediately tried again:

git push --verbose

and this time it worked:

Pushing to USER@REMOTE:/git/PROJECT.git
Counting objects: 9, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (5/5), done.
Writing objects: 100% (5/5), 588 bytes, done.
Total 5 (delta 4), reused 0 (delta 0)
To USER@REMOTE:/git/PROJECT.git
    87d6996..1cae8b3  master -> master
updating local tracking ref 'refs/remotes/origin/master'

so it’s just totally flaky. I’m starting to suspect that git just doesn’t like LDAP.

Original post:

We’re transitioning from cvs to git, and I have a test setup where I have a git server that authenticates users with LDAP, let’s call it REMOTE, and then my personal machine, let’s call it LOCAL. Both machines are Macs. All employees of the company (including me) are members of a group I’ll cleverly call GROUP.

I ssh’d to REMOTE as me and created a git repository there in a folder named /git/PROJECT.git using cvs2git.

Then, back on LOCAL, I did:

git clone USER@REMOTE:/git/PROJECT.git

which was fine. On my Mac («LOCAL») I then edited a few files, deleted a couple, and did

git -a FILES
git rm FILES
git commit -m 'COMMENT'

and life was good.

Then (still on LOCAL) I executed:

git push

to push my changes from LOCAL back to REMOTE and got this:

Counting objects: 19, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (9/9), done.
Writing objects: 100% (10/10), 1.46 KiB, done.
Total 10 (delta 8), reused 0 (delta 0)
remote: error: unable to create temporary file: No such file or directory
remote: fatal: failed to write object
error: unpack failed: unpack-objects abnormal exit
To USER@git-server-co.local:/git/PROJECT.git
 ! [remote rejected] master -> master (unpacker error)
error: failed to push some refs to 'USER@git-server-co.local:/git/PROJECT.git'

I researched this problem and it sounded like it might be that might $TMPDIR is wrong, so I ssh’ed to REMOTE, created a directory named /git/tmp, made sure it had write permissions, edited my .bashrc, and set $TMPDIR to /git/tmp.

Back on LOCAL, if I execute

ssh USER@REMOTE echo $TMPDIR

I correctly see the response

/git/tmp

If I ssh to REMOTE and check file permissions, here’s what I see:

ls -l /git
drwxrwxrwx  USER GROUP   tmp
drwxrwsr-x  USER  GROUP   PROJECT.git

ls -l /git/PROJECT.git

all files are rw for owner (me) and group

What else could be causing this error?

p.s. As is the standard on Macs, if I execute:

ssh ADMIN@REMOTE
cd /
ls -l

I see symbolic links: tmp -> /private/tmp, var -> /private/var, and etc -> /private/etc. I adjusted the permissions and ownership so now they are set to:

lrwxr-xr-x   USER   GROUP   etc -> /private/etc
lrwxr-xr-x   USER   GROUP   tmp -> /private/tmp
lrwxr-xr-x   USER   GROUP   var -> /private/var

I also updated the permissions of the actual folders, so if I execute:

cd /private
ls -al

I see:

drwxr-xr-x   USER   GROUP   etc
drwxrwxrwt   USER   GROUP   tmp
drwxr-xr-x   USER   GROUP   var

And finally, if I :

cd /private/var
ls -al

I see:

drwxrwxrwt    USER   GROUP   tmp

Понравилась статья? Поделить с друзьями:
  • Remote error tls handshake failure
  • Remote error tls bad certificate
  • Remote error from secret service org freedesktop dbus error serviceunknown
  • Remote error at least 1 approving review is required by reviewers with write access
  • Remote error access denied or repository not exported