Getting errors when trying to push changes to GitHub

ssh
github
git
#1

It’s been a while since I worked on a project. I’m trying to get the newest update pushed to GitHub, but it’s not working. I added my Cloud9 SSH key to GitHub, but when I attempt to push to the repository, I get this:

Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

I tried running this command, “ssh -vT git @ github . com”, and it tells me

OpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014
debug1: Reading configuration data /home/ubuntu/.ssh/config
debug1: /home/ubuntu/.ssh/config line 1: Applying options for github . com
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to github . com [192.30.253.112] port 22.
debug1: Connection established.
debug1: identity file /home/ubuntu/.ssh/id_rsa type 1
debug1: identity file /home/ubuntu/.ssh/id_rsa-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.6.1p1 Ubuntu-2ubuntu2
debug1: Remote protocol version 2.0, remote software version babeld-80573d3e
debug1: no match: babeld-80573d3e
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-sha1-etm @ openssh . com none
debug1: kex: client->server aes128-ctr hmac-sha1-etm @ openssh . com none
debug1: sending SSH2_MSG_KEX_ECDH_INIT
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: RSA 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48
debug1: Host ‘github . com’ is known and matches the RSA host key.
debug1: Found key in /home/ubuntu/.ssh/known_hosts:3
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /home/ubuntu/.ssh/id_rsa
debug1: Server accepts key: pkalg ssh-rsa blen 279
debug1: key_parse_private2: missing begin marker
debug1: key_parse_private_pem: PEM_read_PrivateKey failed
debug1: read PEM private key done: type
Enter passphrase for key ‘/home/ubuntu/.ssh/id_rsa’:
debug1: No more authentication methods to try.
Permission denied (publickey).

As far as I remember, there’s no passphrase, so I just press ‘Enter’ when I get that prompt.

Most of the help topics I see are about creating a new repository, not losing the ability to push a project to an existing repository.

I opened the “~/.ssh/authorized_keys” file. The key in it is different than the SSH key listed on the account/ssh page. I tried changing it, but it gives me an error about it being a read-only file system. I tried the chmod instructions on docs running-your-own-ssh-workspace

chmod go-w ~/
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys

but it still won’t let me save any changes made to the file.