Skip to content

fatal: could not read Username for 'https://github.com': Device not configured #176

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

Open
danema opened this issue Aug 7, 2012 · 79 comments

Comments

@danema
Copy link

danema commented Aug 7, 2012

Hi,

I get the following trying to push/pull with this plugin.

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

But I cant seem to figure out where to set my username.

Thanks in advance,

David

@shaungrady
Copy link

I have this issue as well. Could it be related to use of credential-osxkeychain?

@sheldon
Copy link
Collaborator

sheldon commented Aug 12, 2012

does seem that way, which os are you guys on?

@shaungrady
Copy link

OS X.

@Dazzla
Copy link

Dazzla commented Aug 17, 2012

Anything? I can't commit at the moment, which is obviously a problem

@danema
Copy link
Author

danema commented Aug 17, 2012

Does this have anything to do with the way you connect to github (https/ssh)? I'm using ssh to connect.
I second @Dazzla, this is getting an issue since we cant push or pull anything.

@shaungrady
Copy link

There's nothing stopping you from using the command line in the meantime, is there?

@PlusOneManagement
Copy link

Same issue. Came out of the blue.

@kracke
Copy link

kracke commented Aug 31, 2012

Try using authentication via ssh instead of https. That solved this issue for me.

@danema
Copy link
Author

danema commented Sep 1, 2012

Are there any settings required to tell the plugin I use ssh?
I run all my projects over ssh, but it doesn't work for me.

@psgibbs
Copy link

psgibbs commented Sep 21, 2012

I had this issue and fixed it according to this stackoverflow answer.

Basically, you may need to update the remote for your repository using: git remote set-url origin git@github.com:username/repo.git

@olivierlacan
Copy link
Contributor

This is not a fix, @psgibbs, you're simply avoiding the secure HTTPS authentication by using the Git protocol instead.

@scottgwald
Copy link

(the following is OS X specific)

Hey, I don't know if this will actually help anyone here, but I just solved a similar problem, and here's what I would suggest:

  1. Follow these instructions to get password-less git pull and git push working from the command line https://help.github.com/articles/set-up-git
  2. Make sure that sublime-text-2-git is using the same installation of git as you get from the command line. If not, you'll see git: 'credential-osxkeychain' is not a git command. in the echo area when you try to push or pull. In that case you should either delete the other git, or specify in Git.sublime-settings which git to use (find this by going to Preferences>Browse Packages... and opening the "Git" folder). In particular, just set git_command equal to the the output of which git at the command line.

Hope this helps someone.

@bailer
Copy link

bailer commented Oct 19, 2012

I got this as well and it was because I added the repository using githubs app for Mac and not the git program that already exists. So I deleted the repository locally and in the github app. Then I cloned the repository using the terminal using git. After this git in sublime text worked fine. And for having a good overview I also added the local repository in the github app as well. So basically, if you used the github app to clone the repository, delete it from your computer and from the app. Then clone the repo using the git program, then u can add the repo in the github app again if u want. Hope this helps in some way...

@jeffself
Copy link

Not working for me either. I use ssh for my git. I'm using the Git that is supplied with the OS X Developer Tools. I use Git from the command line all day long, but can't get the Git:Push to work in Sublime Text 2.

@jeffself
Copy link

Solved my problem. It wasn't with Sublime Text 2. My projects .git/config file was trying to use https instead of ssh for the url. Changed it to use git@github.com/jeffself/project_name.git and everything works now.

@alyssamichelle
Copy link

@kracke Thank you for you answer! It fixed the problem!

@ErikEklund
Copy link

I had the same problem, and could also solve it by changing to the SSH address. The weird thing is the problem only occurred after updating the GitHub client - before that everything worked fine. OS X / GitHub client that auto-updated on 2012-11-08.

@mohsen1
Copy link

mohsen1 commented Nov 8, 2012

I had same problem and solved by updating Primary remote repository in Settings of my repository to git@github.com address that is available in repository page at github.com.

@robin521111
Copy link

but i got issue with that when i using git for codeplex, so that looks i can using ssh for my project, coz they don't have one. is there anyone can give me a solution on that ?

@lyonsun
Copy link

lyonsun commented Feb 26, 2013

@jeffself 's answer solved my problem! Thank you.

@pederan
Copy link

pederan commented Mar 21, 2013

Same for me, thx @jeffself

@BoscoBecker
Copy link

Ainda não consegui resolver essa situação, segue a mensagem de erro:
"$ git push origin fatal: could not read Username for 'https://github.com': No such file or directory"

@kouwen
Copy link

kouwen commented Jan 2, 2014

worked for me >>git remote set-url origin git@github.com:username/repo.git<<

@lbpassos
Copy link

lbpassos commented Jan 9, 2014

@BoscoBecker,
I had the same problem. You must use SSH and not HTTPS.
Please take a look at: https://help.github.com/articles/generating-ssh-keys

@tharakaucsc
Copy link

You can solve this error by using this. I also faced that problem through a day.

git remote add origin https://{username}:{password}@github.com/{username}/project.git

Note: if your password contains '@' character use '%40' instead of that...

@viniciuskoerich
Copy link

Worked for me: git remote add origin https://{username}:{password}@github.com/{username}/project.git

Thank you, tharakaucsc.

@haitao-dou
Copy link

please refer the comment of tharakaucsc, it works.

@ghqgfj
Copy link

ghqgfj commented Jan 26, 2014

Thanks@tharakaucsc. You solved my problem.

The detail step:
1, go to your local git project directory, open ".git/config" file and delete the "[remote "origin"]" section.
2, go to git bash and input "git remote add origin https://{username}:{password}@github.com/{username}/project.git"
3, input git push to check if it works.

@tlarevo
Copy link

tlarevo commented Jan 31, 2014

Thanks @tharakaucsc it worked for me as well, thanks a lot

@coderespawn
Copy link

its a bad idea to use the password in the origin. the command git remote -v shows your github password

@dEkio
Copy link

dEkio commented May 4, 2016

maven-release-plugin 2.5.3 is ok

@BlueRaja
Copy link

BlueRaja commented Nov 7, 2016

My Mac access keychain for git got messed up somehow. I fixed it by doing the following:

  1. Close SourceTree
  2. In a terminal, open the repo directory and type
    sudo git pull
  3. Enter your git username/password when prompted
  4. Open SourceTree again. When prompted to give access to your keychain, click "Always Allow"

@tailorr
Copy link

tailorr commented Nov 22, 2016

HTTPS -->SSH

@Utoo01
Copy link

Utoo01 commented Mar 4, 2017

unable to read askpass response from 'C:\Users\Asus-pc.AndroidStudio2.2\system\tmp\git-askpass-2.bat'

@Utoo01
Copy link

Utoo01 commented Mar 4, 2017

Can't finish GitHub sharing process
Successfully created project 'MyApp01' on GitHub, but initial push failed:
unable to read askpass response from 'C:\Users\Asus-pc.AndroidStudio2.2\system\tmp\git-askpass-2.bat'
failed to execute prompt script (exit code 1)
could not read Username for 'https://github.com': No error
Who can help me!

@Maxzilla60
Copy link

I got it working after having my login credentials stored:

  1. In cmd: Do git config credential.helper store. This will make git store your credentials next time it asks for you to log in.
  2. In cmd: Do any simple git command - I did git fetch - and it'll ask you to give your username and password.
  3. Git now remembers your login and all git commands should not ask for you to log in anymore.
  4. Restart Sublime and it should work!

source

@dminfocn
Copy link

This can be solved by switching to use ssh for your git interactions. Set the following config option:

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

Now your git config file should have a [url ...] section.
% cat ~/.gitconfig # Note, this might be ~/.git/config for you
[user]
email = user@example.com
name = Example user
[url "git@github.com:"]
insteadOf = https://github.com/

@rjshekar90
Copy link

rjshekar90 commented Sep 10, 2017

I used SSH keys but took long hours to debug before it started working...

Use this video link in addition to all that's mentioned above.

https://www.youtube.com/watch?v=JCCRN6ftJZQ

Cheers

@zh794390558
Copy link

Thank you @tharakaucsc. This way works for me.

@applemate
Copy link

solution: commit and push using terminal, terminal will request you to enter username as password. After the first commit. You then can use sublime terminal to commit and push.

@RicardoBarroso
Copy link

@dminfocn instruction worked for me! 👍

@dongmodao
Copy link

when you use ssh link to clone the repository, you should deploy with ssh address. If you use 'https' address to deploy, this error will occur.

@wagenrace
Copy link

For my the problem was premission. I opened a project directly from /opt/lampp
Solution: Terminal -> sudo brackets

@UmamaheshMaxwell
Copy link

Try using authentication via ssh instead of https. That solved this issue for me.

This worked for me, this error pops up when you try to provide SSH_KEY to HTTP URL rather than a SSH URL.

@MartinThoma
Copy link

Does that help: https://stackoverflow.com/a/56634287/562769 ?

@tablatronix
Copy link

This is old, but i just had this issue, I had to change platform from repo/branch to full https url

@BoscoBecker
Copy link

Resolved.

@mbmithun
Copy link

You can solve this error by using this. I also faced that problem through a day.

git remote add origin https://{username}:{password}@github.com/{username}/project.git

Note: if your password contains '@' character use '%40' instead of that...

Thanks a ton! Worked for me

@raguri
Copy link

raguri commented Mar 26, 2021

If you encounter this issue -( Text file busy fatal: could not read Username / No such device or address ). Its not necessary to change from HTTPS to SSH. Try to clear the disk space and try the git url(https). It worked for me.

@DenisBY
Copy link

DenisBY commented Feb 2, 2022

By our company policy, we have to use HTTPS instead of SSH (don't ask me why) with some custom credentials helper. It works in the terminal but with this plugin I'm getting:

git: 'credential-custom-helper' is not a git command. See 'git --help'.
fatal: could not read Password for 'https://user.name@bitbucket.example.com': No such device or address

I adjusted Git.sublime-settings to be like this

{	
	"git_command": "/usr/bin/git"
}

but still have this issue.

@DenisBY
Copy link

DenisBY commented Feb 4, 2022

I fixed it by creating a symlink from /home/user/bin/git-credential-custom-helper to /usr/local/bin/git-credential-custom-helper. I have /home/user/bin/ in my PATH but it seems it's not used by sublime.

@minomy13
Copy link

minomy13 commented Oct 3, 2022

This Gist helped a lot! (Fixed the error!)

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