Member-only story

Github fix could not get username

in Golang project.

Donald Le
Jan 12, 2021

Example error

go: github.com/abc/xyz-utils@v0.0.0-20201015040921-5f23d1a17a73: invalid version: git fetch -f origin refs/heads/*:refs/heads/* refs/tags/*:refs/tags/* in /home/cuongld/go/pkg/mod/cache/vcs/eb83eaf537e0aebe864ffaf3709762d4d27c7d31480b965e40fa5ad2d1145e2d: exit status 128:
fatal: could not read Username for 'https://github.com': terminal prompts disabled

Simple command to fix

git config --global url.git@github.com:.insteadOf https://github.com/

And there you go~~~

--

--

Donald Le
Donald Le

Written by Donald Le

A passionate automation engineer who strongly believes in “A man can do anything he wants if he puts in the work”.

No responses yet