joel goldstick
joel goldstick

Reputation: 4493

fatal: Unable to create in git

I have two machines I work on. I have a github account. Today I get the message:

Username for 'https://github.com': jgoldstick
Password for 'https://[email protected]': 
Counting objects: 29, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (14/14), done.
Writing objects: 100% (16/16), 2.61 KiB | 0 bytes/s, done.
Total 16 (delta 12), reused 0 (delta 0)
To https://github.com/jgoldstick/baseball.git
   7be5c2d..d324acb  master -> master
fatal: Unable to create '/home/jcg/code/python/venvs/baseball/.git/refs/remotes/origin/master.lock': Permission denied
Unexpected end of command stream
(baseball)jcg@jcg:~/code/python/venvs/baseball$ 

However on github it looks like the push worked. What caused the error message?

Upvotes: 1

Views: 947

Answers (1)

mkasberg
mkasberg

Reputation: 17292

Here's the error message:

fatal: Unable to create '/home/jcg/code/python/venvs/baseball/.git/refs/remotes/origin/master.lock': Permission denied

That looks like a directory on your local machine (not github). Your current user (jcg) doesn't have permission to that file. It's a lock file. Try rebooting your machine. If that doesn't work. You might need to recursively chown or chmod that directory to give yourself the correct permissions.

Upvotes: 2

Related Questions