Unable to publish my package


#1

I’m trying to upload my first package, but I’m getting an error, Error communicating with gnome-keyring-daemon.

$ sudo apm publish major
FindPassword: Error communicating with gnome-keyring-daemon
Welcome to Atom!

Before you can publish packages, you'll need an API token.

Visit your account page on Atom.io https://atom.io/account,
copy the token and paste it below when prompted.

Press [Enter] to open your account page on Atom.io. 
Token> ---------------------------------------------
Saving token to Keychain AddPassword: Error communicating with gnome-keyring-daemon

I’m on Ubuntu 14.04 LTS, apm’s version is 0.69. Has anyone else encountered this error before? I’m not sure what I can do to fix this.


#2

Looks like no body knows yet.

More info


#3

Do you really need to run apm under sudo to publish a package? Could it be that root uses a different keychain than the one that you have your Atom.io token in?


#4

[1]: https://github.com/atom/apm/issues/139[quote=“leedohm, post:3, topic:10498, full:true”]
Do you really need to run apm under sudo to publish a package?
[/quote]

Currently you do, with apm 0.69.0 on Linux the apm bin and libs are chmod’d o-r and can’t be executed except by root (unless people know how to chmod manually) (it’s possible this issue is unique to my system but I don’t see why it would be). I filed an issue about this on the apm github project:
[0.69.0 installs with wrong permissions on bin/apm #139][1]


#5

While this issue remains unresolved, is there a different way to publish my package?


#6

@Azeirah: You can try this, I don’t know if there are any security implications of doing a non-selective chmod -R on this dir though but I think it should be OK:

sudo chmod -R o+r /usr/local/share/atom/resources/app/apm/node_modules/atom-package-manager

and then try running apm to deploy without the ‘sudo’


#7

I wasn’t talking about the sudo issue, I don’t mind having to use sudo. If that was actually supposed to upload my package, then it didn’t work unfortunately.


#8

The sudo issue is very possibly why apm can’t talk to your user session’s gnome-keyring, which is why it can’t upload. If we can fix apm so it can run as your currently logged in user without sudo it might fix the gnome-keyring issue and let you publish your package via apm. I just realized now though if you’re not installing Atom from source, /usr/local/share might be the wrong path. Can you run this in a shell and paste the result?

ls -l `which apm`

eg:

ls -l `which apm`
lrwxrwxrwx 1 root root 53 Jun 25 09:54 /usr/local/bin/apm -> ../share/atom/resources/app/apm/node_modules/.bin/apm

(note that they are backticks, not normal single quotes)


#9
# ls -l `which apm`
lrwxrwxrwx 1 root root 53 jun 29 04:10 /usr/bin/apm -> ../share/atom/resources/app/apm/node_modules/.bin/apm

I did install Atom from source, I followed the build guide on the official atom git repo, and then installed the .deb.


#10

Looks like the instance of apm on your system is installed to /usr and not /usr/local, being as it was installed via .deb, so the chmod command would be:

sudo chmod -R o+r /usr/share/atom/resources/app/apm/node_modules/atom-package-manager

Run that, then try to run apm without sudo to publish


#11

The result is very much the same as before ;(


#12

Sorry to hear that working around my issue didn’t fix yours. I’m not aware of any other means to publish a package. Hopefully the Atom devs or someone more familiar with your specific issue will notice this thread and offer assistance


#13

I could try to upload it on my Windows laptop instead of my ubuntu pc.

Anyway, thanks for the help regardless.

Edit: I managed to upload the package from my laptop :smiley: