git使用https,甚至使用ssh-url



我使用SSH URL使用github已经有一段时间了。今天,github决定使用https,并拒绝使用SSH。。。

> git clone git@github.com:G******/app-****.git
Cloning into 'app-****'...
Username for 'https://github.com':

如果我试图从回购中提取变化,结果是一样的:

> git pull origin master
Username for 'https://github.com':

我不明白为什么,到目前为止还没有找到任何帮助。我的.git/config文件配置为使用SSH:

[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
precomposeunicode = true
hooksPath = .githooks
[remote "origin"]
url = git@github.com:G******/app-****.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master
[pull]
rebase = true
[submodule "src/shared/rn-submodule-******"]
active = true
url = git@github.com:G******/rn-submodule-******.git
[submodule "src/shared/rn-submodule-button-****"]
active = true
url = git@github.com:G******/rn-submodule-button-****.git

我试图生成一个新的ssh密钥并将其上传到我的GitHub帐户上,但这并不能解决我的问题。

你知道发生了什么事吗?

非常感谢!

您有这个

[url "https://github.com"]
insteadOf = "git@github.com:"

在您的$HOME/.gitconfig中。这将动态替换/重写URL。您需要从配置中删除该部分:

git config --global --remove-section url.https://github.com

最新更新