Error When Publishing Packages on Atom.io


#1

I am getting an error when trying to publish a new language package to Atom.io. I have followed these instructions exactly, as far as I can tell. http://atom.io/docs/v0.60.0/publishing-a-package

When I run “apm publish”, I get the following error.

Package must pushed up to GitHub before publishing: https://help.github.com/articles/create-a-repo

I have my package on Github here. The repo has been created and the files have been pushed. https://github.com/objectivehtml/language-expressionengine

Can anyone tell me what I am doing wrong? Any help would be greatly appreciated. I have reviewed everything and re-read the docs many times, but can’t figure out what is going wrong.


#2

What’s the repository setting in your package.json? I had to reset it to my repo URL.


#3

Can anyone help me here, this is what i am getting when i try to publish a package:

Registering <package-name> ✗
Registering package failed: Requires authentication

I am using apm publish minor to publish the package and i already have it on my github repo.


#4

The repository setting in my package.json file is:

https://github.com/objectivehtml/language-expressionengine

I have also tried this, which also doesn’t work

https://github.com/objectivehtml/language-expressionengine.git

#5

You could try apm login to try to authenticate with your repo. I have already logged in, but I have seen that error too during my attempts. I have no idea if this will fix it though.


#6

Seeing the exact same issue.

$ apm publish minor
Registering <package-name> ✗
Registering package failed: Requires authentication

#7

Any update on this? I have the same problem while registering my package:

$ apm publish minor
Registering <package-name> ✗
Registering package failed: Requires authentication 

#8

I finally solved this issue and was able to get the package published. I am not exactly sure why it wasn’t working. I had to mess around with the apm commands. Basically, I created a new package, copied my files, and created the remote branch via CLI. It wasn’t working when using Git Tower, but after creating it with the CLI it worked. I also used the apm develop. I wish I could specify what it was exactly that was going wrong, but I can’t.


#9

Can you explain this further? I tried recreating the package but it doesn’t seem to work.


#10

Same here, tried creating a new package just in case there was something wrong with the repo/folder but I had no success.


#11

I don’t know if this is related, but I get an error with $ apm develop:

path.js:360
        throw new TypeError('Arguments to path.join must be strings');

#12

@donaldpipowitch You have this error because apn develop <package-name> requires a package name.


#13

I have the exact same problem.

My guess is that I am developing / publishing with my personal and uninvited yet GH account and not my professional invited account.


#14

I also believe that to be the problem, but can confirm later. (Evidence: friend’s invited GH account can publish on my machine, my currently uninvited GH account can’t).

Edit: I can also confirm that your apm session needs to be logged into an invited GH account.


#15

I confirm, I could publish as soon as my other account was invited.


#16

I also received the message:

Package must pushed up to GitHub before publishing: https://help.github.com/articles/create-a-repo

I am also using Tower and simply deleted the original repository and source and cloned it and that error went away. Then I ran into authentication problems, which had to do with two-factor authentication being enabled. apm login supported two factor authentication, however, apm publish minor did not upon my first attempt to publish. Hopefully this information helps somebody.


#17

Having the same problem trying to publish a new package, has anyone found the solution to this yet?

Have tried the above, and followed the docs for publishing etc but no joy.

apm publish minor  
Package must be in a Git repository before publishing: https://help.github.com/articles/create-a-repo

#18

Is your package in a Git repository?


#19

Yeah, I’ve followed the guide on publishing the package, it’s in a repo at https://github.com/catchamonkey/language-spec

I’ve tried without creating the tag manually and with, have tried without running apm login, and without (manually removed from keychain too).

have tried using different remote URL structures too, SSH (git@github.com:), HTTPS, with and without .git suffix.

But can’t get around the fact apm doesn’t think it’s in a repo.

The package.json contents are as follows;

{
  "name": "language-spec",
  "version": "0.0.0",
  "description": "Provides syntax highlighting for .spec files",
  "repository": "https://github.com/catchamonkey/language-spec",
  "license": "MIT",
  "engines": {
    "atom": ">0.50.0"
  }
}

#20

OK i’ve solved it.

The only way this would publish is when I ran apm publish minor from the ~/.atom/packages/language-spec directory.
I was actually writing it elsewhere and running from there.

That isn’t detailed in the docs, and even says cd ~/github/my-package and publish from there at one point.