致命:与远程交互时遇到NullReferenceException [英] fatal: NullReferenceException encountered when interacting with remote

查看:125
本文介绍了致命:与远程交互时遇到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的发布说:

Git Credential Manager v1.18.0随附.

Comes with Git Credential Manager v1.18.0.

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

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

修复未填充参数或contentType时的Null引用异常

Fixes Null Reference exceptions when parameters or contentType are not populated

(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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆