繁体   English   中英

git ssh不起作用

[英]git ssh doesn't work

我已经完成了文档所说的内容,当我输入ssh -T git@github.com ,它会显示出来

Warning: Permanently added the RSA host key for IP address '[192.30.252.149]:443
' to the list of known hosts.
Hi fifiteen82726! You've successfully authenticated, but GitHub does not provide
 shell access.

但是,当我想将内容推送到github ,它仍然需要我的usernamepassword 为什么?

更新

这是我的.git/config

[core]
        repositoryformatversion = 0
        filemode = false
        bare = false
        logallrefupdates = true
        symlinks = false
        ignorecase = true
        hideDotFiles = dotGitOnly
[remote "origin"]
        url = https://github.com/fifiteen82726/MFA.git
        fetch = +refs/heads/*:refs/remotes/origin/*

您使用的是HTTPS协议而不是SSH。

将存储库的URL更改为git@github.com:fifiteen82726/MFA.git

防爆。 命令git remote set-url origin git@github.com:fifiteen82726/MFA.git

这是GitHub帮助页面,描述了如何获取不同协议的地址https://help.github.com/articles/which-remote-url-should-i-use/

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM