gitgithubgithub-apigithub-for-macgit-tower

Trouble setting up Tower with my GitHub Account - error: could not lock config file


I've been using the GitHub for Mac app but on the suggestion of a friend, decided to give Tower a shot since it can also handle Beanstalk accounts as well.

After installing the trial and putting in my GitHub username and password, I'm given this error:

error: could not lock config file /Users/joshferrara/.gitconfig: Permission denied

I was just curious if anyone knows what's causing this or if it has any relevance to me using Tower. Any help is greatly appreciated!


Permissions on the file:

-rw-rw-rw- 1 joshferrara staff 130 Nov 22 17:14 /Users/joshferrara/.gitconfig

Permissions on the parent directory:

drwxr-xr-x 74 501 staff 2516 Apr 26 14:46 /Users/joshferrara

Solution

  • It turned out to be an odd permission issue between the .gitconfig file that Github for Mac created with root privileges and Tower wasn't able to access.

    A simple change of ownership privileges fixed the problem. Ownership can be changed like so:

    sudo chown -R username [file|directory]
    

    Explanation: