Issue
I clone https://github.com/java093/springside4.git and commit local changed files success in eclipse.Then I use Team->Push to Upstream it show wrong: An internal Exception occurred during push: https://github.com/java093/springside4.git: git-receive-pack not permitted
how can i resolve this problem.It was successed in my other PC use the same git url(https://github.com/java093/springside4.git).
- my eclipse version eclipse-jee-helios-SR2-win32.
- I have set SSH Keys in my github account about this notebook. but how can i checked it has been successed set.
- where can i find the git-receive-pack not permitted logs.
Solution
Check if you are using the same remote address for your upstream repo on your "other PC":
You can use:
- an https address, like you did: but then your ssh keys won't be involved
- an ssh address:
[email protected]:[repo_owner_username]/[repo_name].git
and use a config file as illustrated here.
The bottom line is: if you expect using your ssh keys, you must use an ssh url, not an https one (which would use the GitHub credentials, ie your GitHub login and password, using a _netrc
on Windows or .netrc
on Unix as mentioned in "Syncing with github", not your ssh keys).
As the OP mentions below, the issue in this instance was similar to what bb describes:
Solution to the Git PATH issue when using a non interactive shell
> On Linux
git config remote.origin.uploadpack '/home/<user name>/bin/git-upload-pack'
git config remote.origin.receivepack '/home/<user name>/bin/git-receive-pack'
(or, considering the git installation path on the server in the OP's case:
git config remote.origin.uploadpack '/home/bin/git-upload-pack'
git config remote.origin.receivepack '/home/bin/git-receive-pack'
)
> On Windows
git config remote.origin.uploadpack 'libexec/git-core/git-upload-pack'
git config remote.origin.receivepack 'libexec/git-core/git-receive-pack'
The above solution works well, but assumes you already have a local git repo that is tracking a remote repo on the server.
Cloning a repo will fail with the same error.
git clone -u /home/<user>/bin/git-upload-pack <user>@<host>:/<path-to-repo>
git clone -u /home/bin/git-upload-pack <user>@<host>:/<path-to-repo>
Answered By - VonC