question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

could not read Username for 'https://github.com'

See original GitHub issue
D:\projects\angular-gridster2>npm run deploy-demo

> angular-gridster2@4.7.2 deploy-demo D:\projects\angular-gridster2
> ngh --dir=demo --no-silent --name='Tiberiu Zuld' --email='tiberiuzuld@gmail.com'

Cloning https://github.com/tiberiuzuld/angular-gridster2.git into node_modules\gh-pages\.cache

Cleaning

Fetching origin

Checking out origin/gh-pages

Removing files

Copying files

Adding all

Committing

Pushing

An error occurred!
 { ProcessError: 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

    at ChildProcess.<anonymous> (D:\projects\angular-gridster2\node_modules\gh-pages\lib\git.js:47:23)
    at emitTwo (events.js:126:13)
    at ChildProcess.emit (events.js:214:7)
    at maybeClose (internal/child_process.js:925:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
  code: 128,
  message: 'bash: /dev/tty: No such device or address\nerror: failed to execute prompt script (exit code 1)\nfatal: could not read Username for
\'https://github.com\': No error\n',
  name: 'ProcessError' }
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! angular-gridster2@4.7.2 deploy-demo: `ngh --dir=demo --no-silent --name='Tiberiu Zuld' --email='tiberiuzuld@gmail.com'`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the angular-gridster2@4.7.2 deploy-demo 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!  debug.log

Tried to run this lib to publish my library on gh-pages but was not able to run it on:

OS: Win10
Node: 8.11.0
Npm: 5.8.0

Tried with both the package installed globally and locally. Tried these commands:

// will run from local package
npm run deploy-demo
// in package.json had "deploy-demo": "ngh --dir=demo"
// will run from global package
ngh --dir=demo --no-silent
ngh --dir=demo --no-silent --name='Tiberiu Zuld' --email='tiberiuzuld@gmail.com'

Running any of the commands I get to same error.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5

github_iconTop GitHub Comments

7reactions
tiberiuzuldcommented, Apr 2, 2018

Hi @Programazing , Followed the steps and created the ssh key. That didn’t worked probably because of 2FA.

But when I run with GH_TOKEN as said here worked.

Thanks

2reactions
Programazingcommented, Apr 1, 2018

I’d suggest reading this first and see if that helps.

Read more comments on GitHub >

github_iconTop Results From Across the Web

fatal: could not read Username for 'https://github.com': No such ...
This is an issue with your stored credentials in the system credential cache. You probably have the config variable 'credential.helper' set to ...
Read more >
Fatal: Could not read Username for "https://github.com", No ...
Hello! Today I was doing the setup of a git automation inside a Docker container using hub and I ran into something that...
Read more >
Fixing could not read Username for 'https://github.com'
This stores the user name and password into ~/.git-credentials and is supposed to let you push to an HTTPS Git URL without entering...
Read more >
Git push origin master could not read username for http ...
Git push origin master could not read username for http://github.com. If you clone your project on another computer and try to do: git...
Read more >
Git failed with a fatal error. fatal: could not read Username for...
fatal : could not read Username for 'https://<userName>.visualstudio.com/': terminal prompts disabled. I replaced my User Name above with "<userName>".
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found