Derek
Derek

Reputation: 1307

Eclipse Git Push to Upstream Wrong

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).

  1. my eclipse version eclipse-jee-helios-SR2-win32.
  2. I have set SSH Keys in my github account about this notebook. but how can i checked it has been successed set.
  3. where can i find the git-receive-pack not permitted logs.

Upvotes: 1

Views: 11191

Answers (5)

I found exactly the same problem when I tried to make changes to the repository: An internal Exception occurred during push: https://github.com ..............git: git-receive-pack not permitted).

In my case, it turned out that we in the team use the free version of Gitlab, which has a limit on the number of active members. After the Repository Owner reduced the number of active members to 5, the problem was solved

Upvotes: 0

Cong Wang
Cong Wang

Reputation: 809

Check if you got the "write" access to this repository.

Upvotes: 0

user2530685
user2530685

Reputation: 1

In most of the cases it is due to missing authentication details:

  1. Open configuration.
  2. click change button against URI field.
  3. On change popup window make sure your URI path is like: "https://github.com/[repo_username]/[repo_name].git"
  4. select https protocols
  5. Add repo_username and password.

Hope it will solve the problem.

Upvotes: 0

VonC
VonC

Reputation: 1326676

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>

Upvotes: 2

Derek
Derek

Reputation: 1307

Thanks a lot.This problem is because the git-receive-pack(push) command not right setting. I have resolved it by: git config remote.origin.uploadpack /home/bin/git-upload-pack

GIT : "git-upload-pack: command not found" while pushing to remote server

Upvotes: 2

Related Questions