You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
could not read Username for 'https://github.com': Invalid argument #14
I'm following usage guide, but see error from issue name. What can be the reason? Here is my log with no-silent option:
...
Copying files
Adding all
Committing
Pushing
An error occurred!
(node:5644) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): 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': Invalid argument
Reacted by Anna, Jorge Sepulveda, Ran Lottem, Naveen Kumar, Fabian Stevens Varon, Highsmith Codes, GM TALHA, Lucas Basquerotto, Yahya Essam, Munna Bhakta and 5 more
Reacted by Jorge Sepulveda, Sunny Puri, abelorban89, Yahya Essam, Munna Bhakta and Mahmoud Mabrok Fouad
Reacted by Yahya Essam, Munna Bhakta, Isadora Stangarlin and Mahmoud Mabrok Fouad
@tsupol # Issue is SOLVED! error: failed to execute prompt script (exit code 1) fatal:
could not read Username for 'https://github.com': Invalid argument
1- Create a ssh key using Git Bash using following command
After running this command just install the by default options and enter the password balnk when it prompts.
2- Then run the following commands to locate the public/private key generated from step1
cd .ssh
cd ~/.ssh
3- Then run the following command to view your public:
cat id_rsa.pub
4- Copy your public key and go to your GitHub account -> settings -> create a SSH and GPG keys then click new ssh key and past your public key in the in key text field.
5- Verify your public key using Git Bash by running the following command:
ssh -vT git@github.com
You will get output like this
debug1: channel 0: free: client-session, nchannels 1
Transferred: sent 3848, received 2040 bytes, in 0.2 seconds
Bytes per second: sent 16032.4, received 8499.5
debug1: Exit status 1
Then you no longer got "could not read Username for 'https://github.com': Invalid argument"
Reacted by Filip Barakovski, Fabian Stevens Varon, qdqqd and Luis Jiménez
Thanks for summarizing the golden way with proper certificates.
Please also keep in mind that GH_TOKENs are much more easy to setup. See the README for that.
Also had this issue an solved it creating a GH_TOKEN like described in here , then running the ngh command with the repo flag like this: ngh --repo=https://(your GH_TOKEN)@github.com/your-username/your-repo.git. And that was all for me.
If pops up, delete the git credentials manually from Windows Credential Manager.
For windows to remember the password, use some other commands ( I created a branch and deleted, it asked me username/password on the terminal)
For me the solution to this was updating the remote URL to: git remote set-url https://<username>:<password>@github.com/<username>/<repo_name>.git
This will only work if password does not contain "@" symbol.
And if password does not contain "|" symbol.
Just to share how I did it. I used an access token to get access.
I added it to the repo's secrets, then access them via ${{secrets.XXXXX}} .
It would be like:
Activity
JohannesHoppe commentedon Mar 23, 2017
Are you on windows?
This is a git issue, please try out the various solutions:
atom/atom#8984
... and post the working solution!
karlmartin94 commentedon Jun 8, 2017
For me the solution to this was updating the remote URL to:
git remote set-url https://<username>:<password>@github.com/<username>/<repo_name>.gitrashid-softordi commentedon Jul 13, 2017
@aGoncharuks
@tsupol
# Issue is SOLVED!
error: failed to execute prompt script (exit code 1) fatal:
could not read Username for 'https://github.com': Invalid argument
1- Create a ssh key using Git Bash using following command
ssh-keygen -t rsa -b 4096 -C "your-github@email.com"After running this command just install the by default options and enter the password balnk when it prompts.
2- Then run the following commands to locate the public/private key generated from step1
cd .sshcd ~/.ssh3- Then run the following command to view your public:
cat id_rsa.pub4- Copy your public key and go to your GitHub account -> settings -> create a SSH and GPG keys then click new ssh key and past your public key in the in key text field.
5- Verify your public key using Git Bash by running the following command:
ssh -vT git@github.comYou will get output like this
Then you no longer got "could not read Username for 'https://github.com': Invalid argument"
JohannesHoppe commentedon Jul 14, 2017
Thanks for summarizing the golden way with proper certificates.
Please also keep in mind that GH_TOKENs are much more easy to setup. See the README for that.
rashid-softordi commentedon Jul 15, 2017
@JohannesHoppe
I answer with best possible solution according to problem.
JohannesHoppe commentedon Aug 15, 2017
@rashid-softordi Many thanks for that great tutorial!
ragv1 commentedon Jul 9, 2018
Also had this issue an solved it creating a GH_TOKEN like described in here , then running the ngh command with the repo flag like this:
ngh --repo=https://(your GH_TOKEN)@github.com/your-username/your-repo.git. And that was all for me.JohannesHoppe commentedon Aug 30, 2018
@ragv1 Did you set up the environment variable GH_TOKEN, too?
See:
#20 (comment)
ragv1 commentedon Aug 30, 2018
@JohannesHope No i did not. I just save the GH_TOKEN in a text file and copy/ paste whenever i needed.
munna commentedon Feb 23, 2019
This will only work if password does not contain "@" symbol.
adititipnis commentedon Mar 19, 2019
This helped
khatridev commentedon May 3, 2020
delete ..node_modules/gh-pages/.cache folder
run-
git config --global credential.helper wincredpoup may come again and throw error.
If pops up, delete the git credentials manually from Windows Credential Manager.
For windows to remember the password, use some other commands ( I created a branch and deleted, it asked me username/password on the terminal)
after this I ran my command, pop up never came.
Gesugao-san commentedon Jan 12, 2021
And if password does not contain "|" symbol.
steven1lung commentedon Jun 4, 2022
Just to share how I did it. I used an access token to get access.
I added it to the repo's secrets, then access them via ${{secrets.XXXXX}} .
It would be like: