【发布时间】:2021-02-10 16:33:10
【问题描述】:
我遇到了以前从未遇到过的 Git 问题。 我现在正在使用 Azure Dev Ops 将内容推送到 Git 存储库。 我以前从未使用过它,所以请认为我是一个完全的菜鸟。
我需要连接到 VPN 才能访问 Azure Dev Ops。 我无法访问远程服务器,这意味着我无法使用 shell(我喜欢在 UI 上使用)获取、拉取或推送。 每次我尝试获取(连接我的 vpn)时都会收到以下错误:
致命:无法访问“https://companyname@dev.azure.com/companyname/groupname/_git/reponame/”:无法连接到 dev.azure.com 端口 443:连接被拒绝
当我尝试在没有 vpn 的情况下进行获取时。我得到凭据管理器窗口,询问我的帐户登录名和密码,但由于 VPN 未连接,它无法通过身份验证。
现在,事情开始变得复杂了。 到目前为止,我已经成功地工作了,因为我可以使用 GitHub 桌面应用程序获取、拉取和推送。 它是唯一有效的 UI。我试过其他的,但这是唯一一个设法从远程获取的。
我查看了应用程序日志,一点击“获取”按钮就看到了这个命令:
git -c credential.helper= fetch --progress --prune origin
虽然,此命令在 shell 中不起作用。 我得到同样的错误:
致命:无法访问“https://companyname@dev.azure.com/companyname/groupname/_git/reponame/”:无法连接到 dev.azure.com 端口 443:连接被拒绝
这是我的配置(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
rebase.autosquash=true
http.sslcainfo=C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt
http.sslbackend=openssl
diff.astextplain.textconv=astextplain
filter.lfs.clean=git-lfs clean -- %f
filter.lfs.smudge=git-lfs smudge -- %f
filter.lfs.process=git-lfs filter-process
filter.lfs.required=true
credential.helper=manager
credential.helper=
credential.helper=C:/Program\ Files\ \(x86\)/Git\ Credential\ Manager\ Core/git-credential-manager-core.exe
credential.https://dev.azure.com.usehttppath=true
user.username=My Username
user.name=My Name
user.email=My work email (and email used in my azure account)
commit.template=C:/Users/name/Documents/git_message.txt
alias.st=status
alias.ci=commit
alias.lg=log --graph --date=relative --pretty=tformat:'%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%an %ad)%Creset'
alias.oops=commit --amend --no-edit
alias.review-local=!git lg @{push}..
alias.li=log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)'
alias.lol=log --graph --decorate --pretty=oneline --abbrev-commit
alias.lola=log --graph --decorate --pretty=oneline --abbrev-commit --all
alias.pullall=fetch --all && pull
alias.fp=fetch --prune
alias.ba=branch -a
gui.recentrepo=C:/Users/name/Documents/Workspace_companyname/projectname
filter.lfs.clean=git-lfs clean -- %f
filter.lfs.smudge=git-lfs smudge -- %f
filter.lfs.process=git-lfs filter-process
filter.lfs.required=true
core.repositoryformatversion=0
core.filemode=false
core.bare=false
core.logallrefupdates=true
core.symlinks=false
core.ignorecase=true
submodule.active=.
remote.origin.url=https://companyname@dev.azure.com/companyname/groupname/_git/reponame
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
有人知道是什么导致了这个问题吗?
提前感谢您的帮助。
【问题讨论】:
标签: git azure-devops