Ok, I'm relatively new to git etc. I have a Rails app I duplicated as the base for a new app (which I suspect is where this issue stems from). I had no issues with git on the initial app. For the new app I have initialized a repo, all the local commits are going fine, and the repo exists at github, but when I try to push I get an error:
git-receive-pack not found: did you run git update-server-info on the server?
So far I've checked that git-receive-pack is in /usr/bin, and a I also tried running the command
user$ git push receive-pack=/usr/bin/git-receive-pack
I also tried to alter the .git/config file as per this question ( git-upload-pack: command not found, how to fix this correctly ) to explicitly reference the upload and receive packs. I've also tried running
ssh user@host echo \$PATH
to check what's in the remote non-login path, but I get a permission error (permission denied: publickey).
So, any other suggestions?
UPDATE: I usually don't use the actual git app, but remembered it was there so tried to push from it instead of the command line. The error was different "remote: repository not found". If I search for it in the app it says "This repository's location on disk has changed". Where would it have gone?
UPDATE 2: As per timoras' question below, I think I've now (unintentionally - I only vaguely know what I'm doing) switched from https to ssh. I now get a NEW error when I try to push:
$ git push -u origin master
Invalid command: '/usr/bin/git-receive-pack 'username/appname.git''
You appear to be using ssh to clone a git:// URL.
Make sure your core.gitProxy config option and the
GIT_PROXY_COMMAND environment variable are NOT set.
fatal: Could not read from remote repository
Please make sure you have the correct access rights and the repository exists.
Note that this is a NEW error, NOT the original.
Below is the output if I run '$ git config -e':
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
precomposeunicode = false
[remote "origin"]
url = git@github.com:username/appname.git
fetch = +refs/heads/*:refs/remotes/origin/*
uploadpack = /usr/bin/git-upload-pack
receivepack = /usr/bin/git-receive-pack
[remote "heroku"]
url = git@heroku.com:appname.git
fetch = +refs/heads/*:refs/remotes/heroku/*