Cannot publish existing tag


I mentioned this in another issue but apm publish --tag tagname doesn’t seem to work. Can someone tell me what I’m doing wrong here?

C:\apps\find-selection>git tag

C:\apps\find-selection>apm publish --tag v0.11.0
Publishing find-selection@v0.11.0 failed
Creating new version failed: Git tag not found

I’m on windows 8.0 with atom 0.115.0.


It appears that the tag doesn’t exist on the server side:

It has to be pushed to the server before you can publish a package that relies on that tag:

$ git push origin v0.11.0


Aarrgghh. Now I can’t even publish using minor

C:\apps\find-selection>apm publish minor
Preparing and tagging a new version failed
npm ERR! Error: Command failed: fatal: tag 'v0.11.0' already exists
npm ERR!
npm ERR!     at ChildProcess.exithandler (child_process.js:637:15)
npm ERR!     at ChildProcess.EventEmitter.emit (events.js:98:17)
npm ERR!     at maybeClose (child_process.js:743:16)
npm ERR!     at Process.ChildProcess._handle.onexit (child_process.js:810:5)
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR!     <>

npm ERR! System Windows_NT 6.2.9200
npm ERR! command "C:\\Chocolatey\\lib\\Atom.0.115.0\\tools\\Atom\\resources\\app\\apm\\node_modules\\atom-package-    manager\\bin\\\\
node.exe" "C:\\Chocolatey\\lib\\Atom.0.115.0\\tools\\Atom\\resources\\app\\apm\\node_modules\\atom-package-    manager\\node_modules\\
npm\\bin\\npm-cli.js" "version" "minor" "-m" "Prepare %s release"
npm ERR! cwd C:\apps\find-selection
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.4
npm ERR! code 128

It appears that apm won’t recognize that v0.11.0 exists. I know this might be silly, but could publish be expecting the output of git tag to be in numerical order instead of alphabetical? Maybe git on windows is different than git on Mac. My tags are definitely in the correct order in the repo.

Here is the tortoisegit image to show order of tags. Note apm added yet another commit. I’m going to get to 100 pretty soon. --grin–


The tag exists locally, but not on the server. Try this:

  1. git push origin master
  2. git push --tags
  3. apm publish --tag v0.11.0

This is assuming that the package.json contained at the v0.11.0 tag says that the version is v0.11.0?

[solved] How to publish a package forked from another one?

Thanks, that worked. I guess I’ll need to do this every time I publish. I didn’t realize that github was somehow involved in the publishing process.


You’re welcome :smile: And yes, GitHub is essentially the place where apm gets your packages from when you call apm install.

But now that you’re all in sync, you should be able to just do the following:

  1. Make your changes locally
  2. Commit your changes locally
  3. Push your changes to GitHub
  4. Publish your new version with apm publish minor (or whichever increment is appropriate)