Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/20.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/github/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Git本地环境重置_Git_Github - Fatal编程技术网

Git本地环境重置

Git本地环境重置,git,github,Git,Github,我的本地Git环境似乎一团糟 虽然我的同事可以同步远程存储库,但由于存储库未找到错误,我无法拉或推: fatal: repository 'https://github.com/my-organization/my-project.git/' not found 配置列表(见下文)中的存储库名称没有尾随斜杠 这发生在2FA设置之后。我认为一个全新的git本地环境可以解决这个问题。经过一些在线搜索,我找不到相关信息。这让我怀疑自己是否走上了正确的道路。如果是,如何处理?如果没有,解决方案是什么

我的本地Git环境似乎一团糟

虽然我的同事可以同步远程存储库,但由于存储库未找到错误,我无法拉或推:

fatal: repository 'https://github.com/my-organization/my-project.git/' not found
配置列表(见下文)中的存储库名称没有尾随斜杠

这发生在2FA设置之后。我认为一个全新的git本地环境可以解决这个问题。经过一些在线搜索,我找不到相关信息。这让我怀疑自己是否走上了正确的道路。如果是,如何处理?如果没有,解决方案是什么

而且

这发生在2FA设置之后

这意味着您不能再直接使用GitHub帐户密码,必须使用

但是:所述用户名和密码可能已经通过以下方式缓存:

在这种情况下,您需要删除该助手中github.com的条目,以便使用另一个身份验证(相同的帐户,但带有PAT)。
这是一个例子


对于大多数人来说,这已经足够了

如果关闭2FA,一切正常吗?几天前,从2FA切换回常规身份验证后,一切正常。这次我不能切换回去,因为2FA是强制的。config--system--list不重要:只有git config--list(它将列出所有设置)重要;这段对话已经结束。
$ 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:/Users/me/AppData/Local/Programs/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=cache
user.name=me
user.email=me@abc.com
core.repositoryformatversion=0
core.filemode=false
core.bare=false
core.logallrefupdates=true
core.symlinks=false
core.ignorecase=true
remote.origin.url=https://github.com/my-organization/my-project.git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
branch.dev.remote=origin
branch.dev.merge=refs/heads/dev
branch.me/slt-682.remote=origin
branch.me/slt-682.merge=refs/heads/me/slt-682
branch.me/slt-697.remote=origin
branch.me/slt-697.merge=refs/heads/me/slt-697
branch.tmp_release.remote=origin
branch.tmp_release.merge=refs/heads/tmp_release
branch.unblock_auth.remote=origin
branch.unblock_auth.merge=refs/heads/unblock_auth
branch.predev.remote=origin
branch.predev.merge=refs/heads/predev
git config credential.helper