jcouyang / glist

Taking notes with :octocat: Gist from Atom

Home Page:http://atom.io/packages/glist

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

no username or token field in settings / fatal: could not read...

tessus opened this issue · comments

If I try to save an updated GIST with ctrl-x ctrl-s, I get the following error:

error

According to the documentation, I'm supposed to enter my username and token in the settings for glist, but there are no fields to enter that information:

settings

Please advise.

Hi, please reference to readme. you may need to do Permanently authenticating with Git repositories first https://confluence.atlassian.com/display/STASH/Permanently+authenticating+with+Git+repositories

Glist using git command in your system, so no need authenticate in atom once your https git authentication is configured


Sent from Mailbox

On Tue, Nov 11, 2014 at 2:13 AM, Helmut Tessarek notifications@github.com
wrote:

If I try to save an updated GIST with ctrl-x ctrl-s, I get the following error:
error
According to the documentation, I'm supposed to enter my username and token in the settings for glist, but there are no fields to enter that information:
settings

Please advise.

Reply to this email directly or view it on GitHub:
#5

My git is using the osxkeychain, so I should be set. I'm referring to the next part in the README.
(I can run git clone and git push on the command line w/o entering my username or password.)

open glist's setting and input username and user token if they are empty.

That is why I put a screenshot in the ticket. There is no place to input username and user token.

hmm, I should update the README, you shouldn't need to input username and token since that's not safe.

can you try git clone some gist in you machine? like git clone https://gist.github.com/2208bd0aa2748c2998a5.git

yep, cloning works perfectly. When they are my repos/gists I can also push to them.

I can run git clone and git push on the command line w/o entering my username or password.

weird...that error looks like from git not atom. (I don't think this will work but )can you try git config github.user <github name> and try again? and what version is your git(mine is 1.9.3)?

My git version is 2.1.2.

I tried several things:

git config github.user <github name> did not help.
I checked your source code and it seems it reads the name of the user in the atom config file. Well, the username is not in the config file, so I added it. Did not help either.

Then I searched in Google and it seems that this error message is related to authentication problems with git. I suspect that somewhere in your code either the username or the token is not used where it should be.

So here are my findings:
The gist module in Sublime Text works just fine.
git on the command line works just fine.
git via other GUIs (SourceTree) works just fine.
The only thing that doesn't work is your atom module.

I know it has something to do with the authentication via https, but I can't figure out what the problem is. I suspect that by making your code 'safer' you probably removed the token from an integral part. In any case, I can't get it to work.

Getting the same username error when trying to update gist. would really like to get this working as its the closest functionality to the Gist module in ST3. Gist loads fine after I make an edit and hit a gist and hit glist: SaveGist I get error:

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

I created a new github token for glist just to be sure. CLI git and ST3 Gist module work fine. Any fix?

@tessus @tonyjessup can you update the plugin and try if it works now?

basically here's what i've done to install on a new mac.

  1. input username in setting
  2. ctrl-c ctrl-g
  3. input token
  4. create and save a file ctrl-x ctrl-s

I got the same error before I did this https://confluence.atlassian.com/display/STASH/Permanently+authenticating+with+Git+repositories:

  1. git config --global credential.helper osxkeychain
  2. cd ~/.atom/packages/glist/gist/ANYGISTFOLDER
  3. git push login the first time
  4. then everything works fine

No, unfortunately it didn't work. I'm still getting the same error.

Something is wrong here. Why would I need to login with my username and password, if I'm using a token? The whole reason for using a token is not having to provide a password.
The authentication method and concept in the module seems to have a flaw.

@tessus

  1. the token is for getting the list of gist from api
  2. I think manage version in local just using git command will much simpler then using API
  3. password is not require as long as your machine is already configed capable to push https git without input password.

If this is so, why are you using https at all? Use the ssh notation and everything is fine.

As soon as I change the remote config for a GIST on my local box, I can actually save this GIST, even with your module. But I'm not going to change all of my local GIST configs manually. This also won't help when cloning a new one anyway.

So just change the https to ssh and everything will work. Or give users the choice (maybe a setting?)

hmm, I remember when i create this plugin, gist didn't support ssh(at least the api was not able to list ssh link back then)...well if it support now, im happy to implement the ssh way, i don't like https either.

According to github, gists are nothing more than repositories. You can try changing the remote of one of your gists to use ssh. You'll see it'll work.

I use https exclusively for read only access and iff the server does not support ssh.

Thanks for looking into this.

Any news on this? It's been 7 months. :-)

I rewrote the whole package now it's version 2.0
please do upgrade and really appreciate any feedback