Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Troubles sharing my project from IntelliJ to GitHub (IntelliJ-GitHub permission denied, error= 13)

I'm trying to upload my project code from intelliJ to GitHub straight from the intelliJ IDE but I keep getting this annoying error which is as follows:

Error running Git Cannot run program "/usr/local/git": error=13, Permission denied

I fail to understand why, the user I am logged onto has root access so it should be fine, right? (I'm on a mac btw). I have git installed onto the following directory: "/usr/local/git" which is default.

How do I fix this? Note that this is my first attempt at using GitHub or Git but I've done plenty of reading before hand and nothing covers this.

like image 336
TomTaila Avatar asked Dec 01 '13 22:12

TomTaila


People also ask

How do I fix Git permission denied error?

Always use the "git" user $ ssh -T [email protected] > Permission denied (publickey). If your connection failed and you're using a remote URL with your GitHub username, you can change the remote URL to use the "git" user. You should verify your connection by typing: $ ssh -T [email protected] > Hi USERNAME!

How do I authorize IntelliJ with GitHub?

Press Ctrl+Alt+S to open the IDE settings and select Version Control | GitHub. Select Log In via GitHub. Enter your GitHub credentials in the browser window that opens. If you have two-factor authentication enabled, you will be asked to enter a code that will be sent to you by SMS or through the mobile application.

How do I send a project from IntelliJ to GitHub?

To push changes from the current branch press Ctrl+Shift+K or choose Git | Push from the main menu. To push changes from any local branch that has a remote, select this branch in the Branches popup and choose Push from the list of actions.

Can I push permission to denied GitHub?

This error means the key you are pushing with is attached to another repository as a deploy key, and does not have access to the repository you are trying to push to. To fix this, remove the deploy key from the repository, and add the key to your personal account instead.


1 Answers

Just found the fix to this (Mac version anyways not sure about other OS'). The problem seems to be that although on every read me the git installation says it will be in "/usr/local/git" however in IntelliJ you should change that by doing the following:

-Go to preferences --> Version control --> git -change the directory path for the executable to /usr/local/git/bin/git

I also followed the instructions for setting up the SSH which I was directed towards by the comment above left by "Pippin", (links here: https://help.github.com/articles/error-permission-denied-publickey and https://help.github.com/articles/generating-ssh-keys) although I'm not sure if this was actually a prerequisite for the fix.

like image 174
TomTaila Avatar answered Sep 27 '22 21:09

TomTaila