sublime-text-git icon indicating copy to clipboard operation
sublime-text-git copied to clipboard

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

Open danema opened this issue 12 years ago • 79 comments

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

danema avatar Aug 07 '12 11:08 danema

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

shaungrady avatar Aug 07 '12 18:08 shaungrady

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

sheldon avatar Aug 12 '12 16:08 sheldon

OS X.

shaungrady avatar Aug 12 '12 17:08 shaungrady

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

Dazzla avatar Aug 17 '12 10:08 Dazzla

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.

danema avatar Aug 17 '12 11:08 danema

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

shaungrady avatar Aug 17 '12 15:08 shaungrady

Same issue. Came out of the blue.

PlusOneManagement avatar Aug 21 '12 16:08 PlusOneManagement

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

kracke avatar Aug 31 '12 12:08 kracke

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.

danema avatar Sep 01 '12 06:09 danema

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 [email protected]:username/repo.git

psgibbs avatar Sep 21 '12 00:09 psgibbs

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

olivierlacan avatar Oct 17 '12 19:10 olivierlacan

(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.

scottgwald avatar Oct 17 '12 20:10 scottgwald

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...

bailer avatar Oct 19 '12 13:10 bailer

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 avatar Oct 19 '12 13:10 jeffself

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 [email protected]/jeffself/project_name.git and everything works now.

jeffself avatar Oct 19 '12 15:10 jeffself

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

alyssamichelle avatar Nov 05 '12 15:11 alyssamichelle

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.

ErikEklund avatar Nov 08 '12 15:11 ErikEklund

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

mohsen1 avatar Nov 08 '12 23:11 mohsen1

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 ?

robin521111 avatar Jan 22 '13 16:01 robin521111

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

lyonsun avatar Feb 26 '13 19:02 lyonsun

Same for me, thx @jeffself

pederan avatar Mar 21 '13 09:03 pederan

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"

BoscoBecker avatar Jan 02 '14 19:01 BoscoBecker

worked for me >>git remote set-url origin [email protected]:username/repo.git<<

kouwen avatar Jan 02 '14 23:01 kouwen

@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

lbpassos avatar Jan 09 '14 03:01 lbpassos

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...

tharakaucsc avatar Jan 09 '14 09:01 tharakaucsc

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

Thank you, tharakaucsc.

viniciuskoerich avatar Jan 15 '14 18:01 viniciuskoerich

please refer the comment of tharakaucsc, it works.

haitao-dou avatar Jan 23 '14 09:01 haitao-dou

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.

ghqgfj avatar Jan 26 '14 14:01 ghqgfj

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

tlarevo avatar Jan 31 '14 08:01 tlarevo

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

coderespawn avatar Feb 03 '14 22:02 coderespawn