WORKAROUND: Git clone on Windows fails with ‘index-pack failed’ error

I tried checking out a feature branch of a Git repo from the command line on Windows, and received the following error:

fatal: early EOF
fatal: index-pack failed

Absolutely no real info here to help me identify the source problem.

The Fix

To get to the source of the issue, I launched the Git daemon in verbose mode.

 "C:\Program Files\Git\bin\sh.exe" --login -I -c 'git.exe daemon --verbose 

Then, I re-attempt the Git clone of my feature branch

git clone --branch myfeature 'https://MyGitRepoUrl' 

…and I received a a prompt from Windows that the Windows Firewall has blocked some features of this app with a prompt to allow the ports

image_thumb7

What it creates is this new allow rule on Windows Firewall for Git for Windows as shown below

image_thumb4

image_thumb3

Ubuntu 18.04 returns “not found” for Azure CLI install via apt

A quick note for anyone else who encounters this issue…

Recently I tried to install the Azure CLI via apt following the steps in “Install Azure CLI with apt”, I received the error “source not found”, even after modifying my sources list as described in the article.

When I enumerated the sources.list on my Ubuntu 18.04 LTS build, I felt like the list was a little shorter than it should be.

cat /etc/apt/sources.list

Frustrating, to say the least. This was my Ubuntu 18.04 LTS from Canonical, created via the new ‘”Quick Create” experience on Windows 10.

The Fix

After reading the issues others had with this in Github comment threads with no fix, I quickly decided to go back to basics.

To resolve the issue, I tried replacing my sources.list file from a known good source of the default sources.list file, as shown below.

Backup the original /etc/apt/sources.list

sudo mv /etc/apt/sources.list /etc/apt/sources.list.backup

Download my updated /etc/apt/sources.list

cd /etc/apt/
sudo wget https://gist.githubusercontent.com/h0bbel/4b28ede18d65c3527b11b12fa36aa8d1/raw/a4ab1c13a92171822215143b1e3b3eb6add7a78d/sources.list">https://gist.githubusercontent.com/h0bbel/4b28ede18d65c3527b11b12fa36aa8d1/raw/a4ab1c13a92171822215143b1e3b3eb6add7a78d/sources.list

Problem solved.

New Linux VM experience via “Quick Create” on Windows 10

I’ve never been a fan of the Windows subsystem for Linux, largely because it brings limitations and unpredictability to my Linux experience, leaving me frustrated. I prefer a full Linux VM, and a recent build of Windows 10 brings this Quick Create experience in Hyper-V for Ubuntu 18.04. (I believe this showed up in October, but I am on Windows 10 build 182298). What I like most about this build is that Xrdp is pre-installed, so you can remote into the VM and get a full screen and multi-monitor Linux experience (read below) right out of the gate.

To create your Ubuntu VM…

In Hyper-V Manage, right click your VM name and select Quick Create.

Ubuntu1

The Create Virtual Machine wizard then downloads the Ubuntu 18.04 LTS image (~1.5GB).

Ubuntu2

Once downloaded, you’ll walk through an abbreviated configuration wizard. When the wizard asks you if you’d like to login automatically, select No. Auto-login breaks remote access via Xrdp.

To access the VM…

You can right click in Hyper-V Manager, and specify full screen. If you select “Use all of my monitors” as shown below, the display automatically extends to your 2-N monitors!

image

Login with your username and password, leaving session value at the default of ‘Xorg’.

Ubuntu3

That’s all there is to it. Get the latest build of Windows 10 and give it a try!