Git: Can't push from one computer

One of my coworkers is having a problem pushing changes from git on his machine. If he logs into another machine, he can push just fine – but from his machine, when he tries to push he gets the following error

    D:\Projects\test1\best-practices>git push
    Counting objects: 4, done.
    Compressing objects: 100% (2/2), done.
    Writing objects: 100% (3/3), 273 bytes, done.
    Total 3 (delta 1), reused 0 (delta 0)
    error: unable to create temporary sha1 filename ./objects/42: Permission denied

    fatal: failed to write object
    error: unpack failed: unpacker exited with error code
    To //civ3s012/gitrepos/best-practices/.git
     ! [remote rejected] master -> master (n/a (unpacker error))
    error: failed to push some refs to '//civ3s012/gitrepos/best-practices/.git'

The server is a windows machine, as is the client. No one else is having this problem – it seems to be a server permissions issue, but we’ve ruled that out as far as we can tell. Also, the fact that he can log into a different machine and push, using the same username, makes it seem like it’s not server permissions. Any ideas what could be going wrong here?

  • Is there a way to view complete git diff using a GUI tool?
  • Can I merge one file|commit or I need to merge the whole files?
  • Git setting up ssh key
  • How to push a new local repository in github account from ubuntu terminal?
  • Git doesn't detect changes after .git dir moved, returned
  • Is the SHA-1 of commits calculated based only on the content of the tree?
  • Automated sync between Github and Kiln
  • How to revert a “git rm -r .”?
  • Git Bash 2.5 cannot connect to mysql
  • Redmine: associated revisions not updating for non-master branches
  • Do I commit the package-lock.json file created by npm 5?
  • GitHub: How to fork a public repository as a subdirectory in a private repository?
  • 6 Solutions collect form web for “Git: Can't push from one computer”

    I’m not a windows user so I’m stabbing in the dark a little here. It looks like the remote file system is mounted and you’re just pushing to that (not using ssh:// or git://). Is that FS somehow mounted readonly? Can he create/modify files on there (outside of git)?

    Try adding this configuration variable to the remote repository:

     $ git config core.sharedRepository "all"
     $ git config receive.denyNonFastForwards True
    

    These are usually set by the --shared option in git init, when the repo is set up.

    I don’t know how windows permissions interact, so I’m not sure that this is the solution. But I know that sometimes a linux user can create files with permissions that fail in a Git remote in exactly this way. It happened when they belong to the proper group but don’t have it as their primary group. Setting the repo sharing to all gets around this.

    This seems happen with shared repos imported from SVN or CVS.

    I know this is the easy-peasy sysadmin blowoff answer, but have you verified that his harddrive isn’t full?

    The problem ended up being a stored password for that share which allowed read access, but not write access. Even when we explicitly mounted the drive with the appropriate username and password, the stored password must have been used in the background, which made this difficult to track down. To clear the password, we went to Control Panel, User Accounts, clicked on Advanced, Manage Passwords, and removed the logon information for the server in question. After that, everything worked as it should. I’m accepting Pat Notz’s answer, since it did end up being a read-only FS. Thanks!

    Maybe he’s created a branch in his local repo that already exists on the server and that ref can’t be updated because it was created by someone else?

    Another brain dead answer. You sure you have permissions to read those files? Has happened to me a few times where I’ll make a change as another user by mistake. Then later I can’t push. Chown is your friend.

    Git Baby is a git and github fan, let's start git clone.