To get the remote address:
Try
git remote show -n origin
This gives the remote info without pinging them.
You can also do
git remote -v
For quick look at the urls.
Adding your SSH public key to the server:
Apologies if this is obvious, but if you are able to verify that the git url is correct, the next thing I would check is the SSH key. Since it sounds like you already have an SSH key set up on the client side, a failed authentication may mean you need to add your ssh public key to the git server. This is different depending on your git server, but:
Since you seem to have an ssh key already, you will probably want to use the existing one for simplicity. Otherwise you'll need to configure ssh to use the right key for the right url.
Fixing access to your SSH private key:
Though it sounds more like a server access problem to me, I suppose it's possible that Forbidden could mean your id_rsa private key file has the wrong permissions. According to this answer, the right permissions for a private key file are 600
, ie chmod 600 /home/cody/.ssh/id_rsa
.
Or, though I think usually it would prompt you more than once when given an incorrect password, I guess it could mean that you have the incorrect password for your private key, in which case you can just create a new one with the instructions on one of the links above.