GitHub – Issue – Git Push Hangs

Photo by Giallo from Pexels

Overview

When you have exhausted all other git CLI commands, the git push CLI command just hangs, and doesn’t prompt you for a password.

As a last resort, remove GitHub from windows, reinstall it, and generate a new token.

Type Uninstall in the Windows Search Bar and open Add or remove programs

Search for Git

Click on Git version x.xx.xx and click on Uninstall.

Download & Install Git Bash

Download Git Bash

Generate a Token

The images and instruction are from Github’s documentation on Generating a new Token.

Got to your online github.com site and open your Profile -> Settings in upper right hand corner.

Settings icon in the user bar

Click on Developer Settings

Developer settings

Click on Personal access tokens In the left side bar.

Personal access tokens

Generate new token

Personal access tokens

Set the expiration date

Token expiration field

Click on Repo, Admin:repo_hook, and delete repo etc.

Selecting token scopes

Generate the Token

Generate token button

Copy the token

Newly created token

Try Git Push

Go to a GitHub Repository on your local hard drive and run the following:

git push

You should be prompted for Username and Password.

Type in your username and use the Token for the Password.

IMPORTANT!: Use the token for your password.