与远程交互时遇到NullReferenceException

与远程交互时遇到NullReferenceException

本文介绍了致命:与远程交互时遇到NullReferenceException的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

这是一台全新安装了Git的新机器.

This is new machine with fresh install of Git.

> git --version
git version 2.19.1.windows.1

我使用https克隆了仓库.每次我尝试与远程通话时,我都会得到这个.

I cloned repo using https. Every time when I try to talk to remote I get this.

> git pull
fatal: NullReferenceException encountered.
Object reference not set to an instance of an object.
fatal: NullReferenceException encountered.
Object reference not set to an instance of an object.

我尝试再次卸载并安装git.我也将相同的存储库克隆到磁盘上的其他目录,但这无济于事.

I tried uninstalling and installing git again. I also cloned same repo to different directory on disk but none of this helped.

当我进入BitBucket的Web UI时,启用了2FA.我不知道这是否与我的问题有关.

When I go to web UI of my BitBucket, there is 2FA enabled. I don't know if this has anything to do with my problem.

推荐答案

原因是与Git 2.19.1一起分发的Git凭据管理器(GCM)需要更新.

The reason for this is that the Git Credential Manager (GCM) that is distributed with Git 2.19.1 needs to be updated.

Git 2.19.1的发布说:

当我们查看 GCM 1.18时. 1 (下一个版本)发行说明:

And when we look at GCM 1.18.1 (the next version) release notes:

(2018年11月23日编辑):正如 @pgsandstrom 在评论中所说, Git发布了一个新版本,其中还包含一个较新的GCM.您可以在此处下载: Git版本.

(Edit 23. Nov 2018): As @pgsandstrom says in the comment, Git has released a new version that also contains a newer GCM. You can download it here: Git Releases.

(Rest是2018年11月23日之前的旧版本))

在Git发布具有更新的GCM的新版本之前,临时修补程序是自己直接安装新版本的Git Credential Manager.

The interim fix, until Git releases a new version with the updated GCM is to simply install the new version of Git Credential Manager yourself.

因此,请从此处下载最新版本并安装它,它应该可以解决您的问题.

So go download the latest version from here and install it and it should fix your issues.

请注意,我不清楚这是Git引入的错误(即,它无法填充参数或contentType)还是GCM引入的错误.我所知道的是,Git尚未发布可解决此问题的新版本,但GCM已发布.

Note that it is not clear to me whether this is a fault introduced by Git (ie. it fails to populate the parameter or contentType), or that it is a fault introduced by GCM. All I know is that Git has not released a new version that fixes the issue but GCM has.

这篇关于致命:与远程交互时遇到NullReferenceException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-07 02:51