SSH推送到github失败,但可以进行身份​​验证

时间:2017-06-28 15:21:02

标签: git powershell ssh

由于某种原因,我似乎无法使用 Powershell push使用github,但使用 CygWin 似乎运行顺利。

我正在使用任务计划程序设置自动推送到存储库,使用 Powershell 就可以更高效。

令我困扰的是,我完全能够使用ssh -T github@github.com ssh到我的帐户,配置文件似乎也正确设置。 见下图:

enter image description here

根据我对Git的基本理解,我在推送时给出的错误消息只是说我可能没有经过正确的身份验证。但是看着我的ssh我似乎被认证了?

这是我的配置:

[core]
    repositoryformatversion = 0
    filemode = false
    bare = false
    logallrefupdates = true
    symlinks = false
    ignorecase = true
[remote "origin"]
    url = git@github.com:Somename/SomeRepo.git
    fetch = +refs/heads/*:refs/remotes/origin/*

预定脚本:

echo "cool"

git add .

git commit -m "some stuff"

git push origin master 

ssh -vT git@github.com输出:

MVC master $ ssh -v git@github.com
OpenSSH_5.4p1, OpenSSL 1.0.0 29 Mar 2010
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to github.com [192.30.253.112] port 22.
debug1: Connection established.
debug1: identity file /.ssh/id_rsa type -1
debug1: identity file /.ssh/id_rsa-cert type -1
debug1: identity file /.ssh/id_dsa type -1
debug1: identity file /.ssh/id_dsa-cert type -1
debug1: Remote protocol version 2.0, remote software version libssh-0.7.0
debug1: no match: libssh-0.7.0
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.4
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-sha1 none
debug1: kex: client->server aes128-ctr hmac-sha1 none
debug1: sending SSH2_MSG_KEXDH_INIT
debug1: expecting SSH2_MSG_KEXDH_REPLY
debug1: Host 'github.com' is known and matches the RSA host key.
debug1: Found key in /.ssh/known_hosts:1
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 public key: C:\\Users\\Todai\\.ssh\\ps_id_rsa
debug1: Server accepts key: pkalg ssh-rsa blen 279
debug1: Authentication succeeded (publickey).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
PTY allocation request failed on channel 0
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
Hi SomeName! You've successfully authenticated, but GitHub does not provide shell access.
debug1: channel 0: free: client-session, nchannels 1
Connection to github.com closed.
Transferred: sent 2640, received 1992 bytes, in 0.2 seconds
Bytes per second: sent 13538.5, received 10215.4
debug1: Exit status 1

git config --list

MVC master $ git config --list
core.symlinks=false
core.autocrlf=true
core.fscache=true
color.diff=auto
color.status=auto
color.branch=auto
color.interactive=true
help.format=html
http.sslcainfo=C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt
diff.astextplain.textconv=astextplain
rebase.autosquash=true
credential.helper=manager
filter.lfs.clean=git-lfs clean -- %f
filter.lfs.smudge=git-lfs smudge -- %f
filter.lfs.required=true
user.name=todai88
user.email=joabaj88@gmail.com
credential.helper=manager
core.repositoryformatversion=0
core.filemode=false
core.bare=false
core.logallrefupdates=true
core.symlinks=false
core.ignorecase=true
remote.origin.url=git@github.com:SomeName/PluralSight_MVC.git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
user.name=SomeName
user.email=SomeEmail@email.com

0 个答案:

没有答案