git fetch someremote # the remote is on github.com, and using SSH
the above command succeeds if I issue it from a terminal, but if I put it in a bash script, it will fail, with:
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
I hope this gives someone some clue as to help figure out why it fails in the bash script but succeeds at a terminal! Anyone have any idea?
Same thing seems to happen if I use either SSH or HTTPS
~/.ssh/id_rsa?