GitHub:- Git push – Error Message – “Failed to enumerate credentials. [0x520]”

Background

On a couple of Git Repositories, I have been having issues completing “git push” commands.

 

Error Message

Failed to enumerate credentials. [0x520]

Image

Textual


fatal: Failed to enumerate credentials. [0x520]
fatal: A specified logon session does not exist. It may already have been terminated

Explanation

  1. fatal: Failed to enumerate credentials. [0x520]
  2. fatal: A specified logon session does not exist. It may already have been terminated

TroubleShooting

Outline

  1. Git Commands
    • Git Remote

Tasks

Git Commands

Git Remote

Outline

The git remote command allows us to read and set the remote repository that is tracked by our current local repository.

Syntax

git remote -v

Sample

git remote -v

Output
Output – Image

Output – Text

>git remote -v
origin https://github.com/DanielAdeniji/hello (fetch)
origin https://github.com/DanielAdeniji/hello (push)

Explanation
  1. Origin
    • https
  2. Organization
    • DanielAdeniji
  3. Repository
    • hello

Remediation

Because git remote returns a URL, we need to change from HTTP to ssh.

Outline

  1. Git Commands
    • Git Remote
      • Git Remote set-url
      • Git Remote -v
    • Git Push
      • git push

Tasks

Git Commands

Git Remote Set-URL

Syntax

git remote set-url origin git@github.com:USERNAME/REPOSITORY.git

Sample

git remote set-url origin git@github.com:labOrg/dbWork.git

Git Remote -v

Syntax

git remote -v

Sample

git remote -v

Output – Text

>git remote -v
origin git@github.com:labOrg/hello.git  (fetch)
origin git@github.com:labOrg/hello.git  (push)

Explanation
  1. git@github.com
    • git
      • Using ssh keys
  2. Organization
    • DanielAdeniji
  3. Repository
    • hello.git

Git Push

Syntax

git push

Sample

git push

Output
Output Image

Output Text
>git push
Enter passphrase for key '/c/Users/dadeniji/.ssh/id_rsa':
Enumerating objects: 20, done.
Counting objects: 100% (20/20), done.
Delta compression using up to 4 threads
Compressing objects: 100% (13/13), done.
Writing objects: 100% (14/14), 4.22 KiB | 863.00 KiB/s, done.
Total 14 (delta 4), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (4/4), completed with 3 local objects.
To github.com:DanielAdeniji/hello.git
   88b595f..0f3fbcc  master -> master

Summary

Changing git authentication from HTTP to ssh remediated the issue.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s