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:
git@github.com:[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>