Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fatal: could not read Username for 'https://github.com': No error #230

Closed
cpilson opened this issue Feb 26, 2018 · 26 comments
Closed

fatal: could not read Username for 'https://github.com': No error #230

cpilson opened this issue Feb 26, 2018 · 26 comments

Comments

@cpilson
Copy link

cpilson commented Feb 26, 2018

Running under Windows 10.
"Nothing changed" in my local config. I was able to to a git push just prior to trying this deploy, so I can communicate with the repo via CLI.

I'd not pop up here, but I've been at this for a couple hours now and haven't made progress. Git CLI doesn't show a Username object, just a user object.

SET NODE_DEBUG=gh-pages&&yarn run deploy

yarn run v1.3.2
$ gatsby build && gh-pages -d public -b master
success delete html files from previous builds — 0.071 s
success open and validate gatsby-config.js — 0.009 s
success copy gatsby files — 0.063 s
success onPreBootstrap — 0.773 s
success source and transform nodes — 0.070 s
success building schema — 0.188 s
success createLayouts — 0.025 s
success createPages — 0.001 s
success createPagesStatefully — 0.028 s
success onPreExtractQueries — 0.001 s
success update schema — 0.105 s
success extract queries from components — 0.016 s
success run graphql queries — 0.017 s
success write out page data — 0.015 s
success write out redirect data — 0.002 s
success onPostBootstrap — 0.001 s

info bootstrap finished - 4.406 s

success Building CSS — 4.831 s
success Building production JavaScript bundles — 8.772 s
success Building static HTML for pages — 2.957 s
info Done building in 20.976 sec
GH-PAGES 14240: Cloning https://github.com/cpilson/cpilson.github.io.git into node_modules\gh-pages.cache\aHR0cHM6Ly9naXRodWIuY29tL2NwaWxzb24vY3BpbHNvbi5naXRodWIuaW8uZ2l0
GH-PAGES 14240: Cleaning
GH-PAGES 14240: Fetching origin
GH-PAGES 14240: Checking out origin/master
GH-PAGES 14240: Removing files
GH-PAGES 14240: Copying files
GH-PAGES 14240: Adding all
GH-PAGES 14240: Committing
GH-PAGES 14240: Pushing
fatal: HttpRequestException encountered.
An error occurred while sending the request.
bash: /dev/tty: No such device or address
error: failed to execute prompt script (exit code 1)
fatal: could not read Username for 'https://github.com': No error

@tadachi
Copy link

tadachi commented Feb 27, 2018

Also running on Windows 10.
I've been getting similar errors. I haven't changed my configuration in my code and was happily deploying up until yesterday. Decided to check out issues and found @cpilson having similar problems.

   One or more errors occurred.
bash: /dev/tty: No such device or address
error: failed to execute prompt script (exit code 1)
fatal: could not read Username for 'https://github.com': Invalid argument

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! hydra-chat@0.1.0 deploy: `gh-pages -d build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the hydra-chat@0.1.0 deploy script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\{username}\AppData\Roaming\npm-cache\_logs\2018-02-27T03_21_59_227Z-debug.log
`

@cipchk
Copy link

cipchk commented Feb 27, 2018

Try adding this into your git config

[credential]
    helper = wincred

or via console

git config --global credential.helper wincred

@tadachi
Copy link

tadachi commented Feb 27, 2018

Came across this:

https://github.com/Microsoft/Git-Credential-Manager-for-Windows

As of 22 Feb 2018, GitHub has disabled support for weak encryption which means many users will suddenly find themselves unable to authenticate using a Git for Windows which (impacts versions older than v2.16.0). DO NOT PANIC, there's a fix. Update Git for Windows to the latest (or at least v2.16.0).

The most common error users see looks like:

fatal: HttpRequestException encountered.
   An error occurred while sending the request.
fatal: HttpRequestException encountered.
   An error occurred while sending the request.
Username for 'https://github.com': 

I was running git version 2.11. Updated to 2.16 and everything is working fine now.

EDIT: clarify, I'm able to publish as before.

@cpilson
Copy link
Author

cpilson commented Feb 27, 2018

This sure looks promising, @tadachi

When I get back to my desktop I’ll gice this a shot. Good find!

EDIT: again, good find! I was running git version 2.15.0.windows.1. I've now updated to git version 2.16.2.windows.1 and have just run a successful yarn deploy script. Thank you!

@cpilson cpilson closed this as completed Feb 28, 2018
@rosdi
Copy link

rosdi commented Mar 10, 2018

Yep..., this works! Upgraded from 2.13 to 2.16...

@anant1525
Copy link

yes upgrade works for me too. thanks @cpilson

@RadekKosiada
Copy link

RadekKosiada commented May 7, 2018

I had the same issue, running git version 2.15.0.windows.1 I have also updated to the most recent version git version 2.17.0.windows.1 and have just published my project to gh-pages. Thanks for the hint!

@bluehenry
Copy link

Upgraded from 2.13.3 to 2.17.1 and the issue was resolved.

@pun111
Copy link

pun111 commented Aug 8, 2018

My issue was not resolved by updating to v. 2.18. Need help

@rosdi
Copy link

rosdi commented Aug 8, 2018

@pun111 What do you see when you type git --version ?

@pun111
Copy link

pun111 commented Aug 9, 2018

Thanks a lot for replying. I see

git version 2.18.0.windows.1

I will happily provide more information as necessary, however I truly do not know what is important for you to best help me. I am running Windows 10, installed all pending updates today, uninstalled and reinstalled Git (with restarts), reinstalled VisualStudio. I have never had any problems with Git, the issue started a couple of days ago. No important update was installed AFAIK.

In PowerShell I was getting fatal: HttpRequestException encountered. An error occurred while sending the request. Username for 'https://bitbucket.org': fatal: could not read Username for 'https://bitbucket.org': No error

Lastly, I tried git config --global credential.helper wincred as instructed elsewhere. This kind of helped, I was able to push/pull, but still seeing fatal: HttpRequestException encountered. An error occurred while sending the request.

This is still quite unfortunate, as there is obviously something wrong and moreover, I use VisualStudio Team Explorer which fails to work correctly when seeing any kind of fatal error.

Any other solutions? Colleague suggested using TortoiseGit, but I honestly do not see how it could help. In my view I am running the correct versions and should be working fine as before

@rosdi
Copy link

rosdi commented Aug 9, 2018

@pun111 Try to delete (or rename) Git folder in C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Git and try again (maybe restart your PC first)...

@pun111
Copy link

pun111 commented Aug 9, 2018

Oh yes, I forgot to mention, that was one of the first things I did. Thus the folder is not there anymore

@pun111
Copy link

pun111 commented Aug 9, 2018

Okay it has to have something to do with the latest Visual Studio update. Just had the exact same thing happen to me on my Windows 7 laptop - after update, same problem.

@rosdi
Copy link

rosdi commented Aug 9, 2018

Had the same problem with a colleague laptop. What we did was delete the Git folder in Team Explorer, and then use Visual Studio installer to uninstall and reinstall its Git. The installer won't actually reinstall its Git (since the latest version already there - which we downloaded from git-scm.com) but it will do something...

After it is done everything works.... cross your fingers...

@pun111
Copy link

pun111 commented Sep 25, 2018

I thought I would update the thread for future users. Tthe issue was solved by updating the Credentials Manager. I think this version solved it https://github.com/Microsoft/Git-Credential-Manager-for-Windows/releases/tag/v1.17.0 but there have been new releases since

@DanStevens
Copy link

I had this problem. Updating git from version 2.16.2.windows.1 to 2.19.1.windows.1 resolved it for me.

@mal90
Copy link

mal90 commented Oct 24, 2018

I had this problem. Updating git from version 2.16.2.windows.1 to 2.19.1.windows.1 resolved it for me.

Yep can confirm. updating git to latest version (2.19.1) solved the issue

@Smriti29
Copy link

Smriti29 commented Jun 5, 2019

Upgrade to the latest version. problem will be solved. Worked for me!!

@omidrah
Copy link

omidrah commented Jul 27, 2019

hi.
solved my problem with this command in cmd

git config --global credential.helper wincred

@alabi4good
Copy link

git update

this worked for me

@Khadoos1993
Copy link

uses git version 2.26.2.windows.1 but facing the same issue even after executing git config --global credential.helper wincred

@Alnezis
Copy link

Alnezis commented May 10, 2020

uses git version 2.26.2.windows.1 but facing the same issue even after executing git config --global credential.helper wincred

I also faced this problem

@akshaysk-ask
Copy link

Cloning into 'C:\Users\Shreedhar\twilio-video-react-hooks\node_modules.cache\gh-pages\git@github.com!akshaysk-ask!react-video-app.git'...
Host key verification failed.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! react-express-starter@0.1.0 deploy: gh-pages -d build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the react-express-starter@0.1.0 deploy script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Shreedhar\AppData\Roaming\npm-cache_logs\2020-09-23T07_04_58_830Z-debug.log

@MkMan
Copy link

MkMan commented Feb 8, 2021

I am getting this error running the command on Ubuntu in a Github workflow.

@loeffel-io
Copy link

Try adding this into your git config

[credential]
    helper = wincred

or via console

git config --global credential.helper wincred

thanks man!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests