Wednesday, 15 May 2013

ssh github works, but not git push. -



ssh github works, but not git push. -

i've never encountered ssh working , git not working in way. not sure how troubleshoot.

ssh seems work (-t prevents first line):

iam@heeere:/e/.ssh$ ssh github pty allocation request failed on channel 0 hi bradyt! you've authenticated, github not provide shell access. connection github.com closed.

git force seems not work

iam@heeere:/e/basic-computing-notes$ git force permission denied (publickey). fatal: not read remote repository. please create sure have right access rights , repository exists. configs

my git config is

iam@heeere:/e/basic-computing-notes$ git config -l user.email=algebrat@uw.edu user.name=brady trainor push.default=simple alias.ac=!git add together --all && git commit alias.lol=log --oneline --graph --decorate --all core.editor=vim core.excludesfile=/e/configs/.gitignore_global core.repositoryformatversion=0 core.filemode=false core.bare=false core.logallrefupdates=true remote.origin.url=git@github.com:bradyt/basic-computing-notes.git remote.origin.fetch=+refs/heads/*:refs/remotes/origin/* branch.master.remote=origin branch.master.merge=refs/heads/master

my ssh config includes

host github hostname github.com user git identityfile "~/.ssh/github_rsa"

since ssh keys has not default name (id_rsa, id_rsa.pub), need utilize ssh config entry defined, in order ssh url reference right keys:

git remote set-url origin github:bradyt/basic-computing-notes.git

that way, ssh ~/.ssh/github_rsa, instead of looking ~/.ssh/id_rsa.

simpler, musikk suggests in comments, changing entry of ssh config github.com.

host github.com github hostname github.com user git identityfile "~/.ssh/github_rsa"

i have kept hostname , user sure, default url work (git@github.com:bradyt/basic-computing-notes.git)

as raphinesse mentions in comments:

in case still want utilize shortcut github, host keyword allows multiple patterns. ssh_config man page:

if more 1 pattern provided, should separated whitespace.

git github ssh

No comments:

Post a Comment