ruby on rails - permission denied when pushing to github because of publickey -


i trying push repository github. have succesfully pushed heroku. when type git push origin master following:

permission denied (publickey). fatal: not read remote repository.  please make sure have correct access rights , repository exists. 

i pushing code many other github repositories know not general issue computer , don't want change default settings on computer. when type git remote -v following:

heroku  https://git.heroku.com/marketvault.git (fetch) heroku  https://git.heroku.com/marketvault.git (push) origin  git@github.com:codeundercoverdev/marketlaunch.git (fetch) origin  git@github.com:codeundercoverdev/marketlaunch.git (push) 

how fix this? i've tried article:

github error message - permission denied (publickey)

but mention involves changing settings on entire computer, whereas computer works fine atleast 20 other applications have on github.

update:

the results of running ssh -tvvv git@github.com verify:

openssh_6.2p2, osslshim 0.9.8r 8 dec 2011 debug1: reading configuration data /etc/ssh_config debug1: /etc/ssh_config line 20: applying options * debug2: ssh_connect: needpriv 0 debug1: connecting github.com [192.30.252.128] port 22. debug1: connection established. debug3: incorrect rsa1 identifier debug3: not load "/users/davidm/.ssh/id_rsa" rsa1 public key debug1: identity file /users/davidm/.ssh/id_rsa type 1 debug1: identity file /users/davidm/.ssh/id_rsa-cert type -1 debug1: identity file /users/davidm/.ssh/id_dsa type -1 debug1: identity file /users/davidm/.ssh/id_dsa-cert type -1 debug1: enabling compatibility mode protocol 2.0 debug1: local version string ssh-2.0-openssh_6.2 debug1: remote protocol version 2.0, remote software version libssh-0.7.0 debug1: no match: libssh-0.7.0 debug2: fd 3 setting o_nonblock debug3: load_hostkeys: loading entries host "github.com" file "/users/davidm/.ssh/known_hosts" debug3: load_hostkeys: found key type rsa in file /users/davidm/.ssh/known_hosts:4 debug3: load_hostkeys: loaded 1 keys debug3: order_hostkeyalgs: prefer hostkeyalgs: ssh-rsa-cert-v01@openssh.com,ssh-rsa-cert-v00@openssh.com,ssh-rsa debug1: ssh2_msg_kexinit sent debug1: ssh2_msg_kexinit received debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1 debug2: kex_parse_kexinit: ssh-rsa-cert-v01@openssh.com,ssh-rsa-cert-v00@openssh.com,ssh-rsa,ssh-dss-cert-v01@openssh.com,ssh-dss-cert-v00@openssh.com,ssh-dss debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-gcm@openssh.com,aes256-gcm@openssh.com,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-gcm@openssh.com,aes256-gcm@openssh.com,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se debug2: kex_parse_kexinit: hmac-md5-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-sha1,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96 debug2: kex_parse_kexinit: hmac-md5-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-sha1,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96 debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib debug2: kex_parse_kexinit:  debug2: kex_parse_kexinit:  debug2: kex_parse_kexinit: first_kex_follows 0  debug2: kex_parse_kexinit: reserved 0  debug2: kex_parse_kexinit: ecdh-sha2-nistp256,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1 debug2: kex_parse_kexinit: ssh-dss,ssh-rsa debug2: kex_parse_kexinit: chacha20-poly1305@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr,aes256-cbc,aes192-cbc,aes128-cbc,blowfish-cbc debug2: kex_parse_kexinit: chacha20-poly1305@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr,aes256-cbc,aes192-cbc,aes128-cbc,blowfish-cbc debug2: kex_parse_kexinit: hmac-sha1,hmac-sha2-256,hmac-sha2-512 debug2: kex_parse_kexinit: hmac-sha1,hmac-sha2-256,hmac-sha2-512 debug2: kex_parse_kexinit: none,zlib,zlib@openssh.com debug2: kex_parse_kexinit: none,zlib,zlib@openssh.com debug2: kex_parse_kexinit:  debug2: kex_parse_kexinit:  debug2: kex_parse_kexinit: first_kex_follows 0  debug2: kex_parse_kexinit: reserved 0  debug2: mac_setup: found hmac-sha1 debug1: kex: server->client aes128-ctr hmac-sha1 none debug2: mac_setup: found hmac-sha1 debug1: kex: client->server aes128-ctr hmac-sha1 none debug2: dh_gen_key: priv key bits set: 159/320 debug2: bits set: 1048/2048 debug1: sending ssh2_msg_kexdh_init debug1: expecting ssh2_msg_kexdh_reply debug1: server host key: rsa 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48 debug3: load_hostkeys: loading entries host "github.com" file "/users/davidm/.ssh/known_hosts" debug3: load_hostkeys: found key type rsa in file /users/davidm/.ssh/known_hosts:4 debug3: load_hostkeys: loaded 1 keys debug3: load_hostkeys: loading entries host "192.30.252.128" file "/users/davidm/.ssh/known_hosts" debug3: load_hostkeys: found key type rsa in file /users/davidm/.ssh/known_hosts:4 debug3: load_hostkeys: loaded 1 keys debug1: host 'github.com' known , matches rsa host key. debug1: found key in /users/davidm/.ssh/known_hosts:4 debug2: bits set: 1020/2048 debug1: ssh_rsa_verify: signature correct debug2: kex_derive_keys debug2: set_newkeys: mode 1 debug1: ssh2_msg_newkeys sent debug1: expecting ssh2_msg_newkeys debug2: set_newkeys: mode 0 debug1: ssh2_msg_newkeys received debug1: roaming not allowed server debug1: ssh2_msg_service_request sent debug2: service_accept: ssh-userauth debug1: ssh2_msg_service_accept received debug2: key: /users/davidm/.ssh/id_rsa (0x7fb6fb416190), debug2: key: /users/davidm/.ssh/id_dsa (0x0), debug1: authentications can continue: publickey debug3: start over, passed different list publickey debug3: preferred publickey,keyboard-interactive,password debug3: authmethod_lookup publickey debug3: remaining preferred: keyboard-interactive,password debug3: authmethod_is_enabled publickey debug1: next authentication method: publickey debug1: offering rsa public key: /users/davidm/.ssh/id_rsa debug3: send_pubkey_test debug2: sent publickey packet, wait reply debug1: authentications can continue: publickey debug1: trying private key: /users/davidm/.ssh/id_dsa debug3: no such identity: /users/davidm/.ssh/id_dsa: no such file or directory debug2: did not send packet, disable method debug1: no more authentication methods try. permission denied (publickey). 

make sure private key generates same public key assigned account on github:

ssh-keygen -yf ~/.ssh/id_rsa 

should print same thing available in ~/.ssh/id_rsa.pub , same content should in your github account.


Comments