Publishing package using ssh token (Solved)


I am atempting to publish a package using ssh security token. I can use git push without an issue, however when trying to publish (or push from within atom for that matter) it fails.

When pushing from within atom I get a big red box:

fatal: cannot run undefined: No such file or directory
fatal: unable to fork

and now I’m getting this when trying to publish with apm publish

Preparing and tagging a new version ✗

npm ERR! Darwin 17.4.0
npm ERR! argv "/Applications/" "/Applications/" "version" "minor" "-m" "Prepare %s release"
npm ERR! node v6.9.5
npm ERR! npm  v3.10.10
npm ERR! code 128

npm ERR! Command failed: git tag v0.1.0 -am Prepare 0.1.0 release
npm ERR! fatal: tag 'v0.1.0' already exists
npm ERR! 
npm ERR! 
npm ERR! If you need help, you may report this error at:
npm ERR!     <>

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/jameshessin/github/atom-darklite/npm-debug.log

ES6 imports not supported in atom? (Solved?)
What are the variables in apm config?

Okay this is what I’ve learned so far. The issue pushing within atom is specific to this project. I have no issues with other projects. The other issue was I was resetting the version info so it wouldn’t even try my REAL issue is this.

I use ssh and mfa on my git account. I never use just a username and password - yet that is what it asks for when I attempt to publish the package. That obviously doesn’t work as it never even asks for the MFA code. Why is it not using my registered ssh key?

EDIT: I have tried deleting my .git folder and running git init again but I am still getting the ‘unable to fork’ message as stated above. Any ideas?

UPDATE: I’ve found out the reason I couldn’t push in the editor was because I was in --dev mode. Don’t know why that breaks the github package but it does. When I load the package normally I can push.


As an aside does anyone know how to unpublish a half published package? My package was pushed to the website but it’s empty and every time I try to publish it I need to use a new version number (I got to v0.5.0 before deciding to do patch upgrades instead).


Okay I figured it out. I had to generate a personal access token and use that as my password. It was burried on the github page (shouldn’t this be in the atom manual?)


apm unpublish will unpublish your package from the registry. You can unpublish specific versions using apm unpublish@x.y.z.

As for the issues with personal access tokens, I don’t have a strong opinion on whether or not it should be included in Atom’s documentation. It’s more of a general GitHub issue than Atom-specific, but I can see why it would be useful.

For the issue with the github package being unclear that it needs a personal access token when using 2FA, you may want to subscribe to