Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cloning a private Repo hangs for new 2.32.0.windows.1 version of git

Question:

Why does git-bash hang when cloning a non-public repo when installed with defaults?

Context:

I ran into this issue when trying to clone a private GitHub repo on my co-workers Windows 10 machine.

Steps to reproduce:

  1. Installed the newest version of git bash for Windows (for at the time of writing this post for me was 2.32.0.windows.1). Choosing all of the defaults.
  2. Run git clone [http-link-to-private-repo]

Screenshot of hanging git clone command

Expected:

  1. A popup to enter username and password information.

My Hack Solution:

  1. When installing 2.32.0. for windows check the "Enable experimental support for pseudo consoles.".

Screenshot of hack option selection

This allows the bash console to present you an option to authenticate via a web browser or a personal access token.

Screenshot of work-around

Unrelated Note:

I originally was looking to post this on the Github Issues page for Git but they don't have one so here I am. Not sure if this is the appropriate place to post this but I wanted it somewhere so another person doesn't run into the same trouble.

like image 454
Chandler Tayek Avatar asked Jun 08 '21 22:06

Chandler Tayek


People also ask

How do I clone a private git repository in Windows?

Clone private Github repo with username/password Once you input the correct one, the output should look something like this : git clone git://[email protected]/username/private-repo.git Cloning into 'private-repo' Password for 'https://your_username@repository_url: remote: Enumerating objects: 3, done.

Can a private repo be cloned?

You also have the option to clone a private GitHub repository using SSH. To do this, you need to start by generating an SSH keypair on your local device. Then add a public key to your GitHub account. This gives you the ability to connect your local device with GibHub using a secure channel over an unsecured network.


2 Answers

Many thanks this was the solution after everything else failed including setting up a new installation, a new access token, and trying to find faulty config files.

After updating my personal access token this behavior also occurred with git 2.28.0.

So i did an update to the newest git version and afterwards the above mentioned steps.

(Sorry, i can not make any comments directly.)

like image 175
Markus R. Avatar answered Oct 02 '22 00:10

Markus R.


I also ran into this problem setting up my dev environment for a new work laptop... Thankfully I had an older Windows GitBash installer (2.31.1) so I ended up downgrading to the older version. Worked like a charm, for me but understand it may not be an option for everyone.

like image 41
nodnsmile22 Avatar answered Oct 02 '22 00:10

nodnsmile22