gpt4 book ai didi

git ssh 不起作用

转载 作者:太空狗 更新时间:2023-10-29 14:27:09 24 4
gpt4 key购买 nike

我已经完成了文档中所说的,当我输入 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 推送内容时,它仍然需要我的用户名密码。为什么?

更新

这是我的.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 协议(protocol)而不是 SSH。

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

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

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

关于git ssh 不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30859162/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com