Apm publish minor - error - "package must be in a Git.."

Hello, I am trying to publish a syntax theme. I am new to GitHub and have read many topics on your discussion forum and followed your flight manual but cannot find a solution. I feel Iike I’m missing a critical step somewhere. (I have tried many times and created new repositories but with no success.

I have successfully created a repository on GitHub: https://github.com/katecooperuk/morticia

I have installed apm on my Mac (OSX 10.14.6) and logged into GitHub via the terminal successfully. And triple checked my package.json file for errors.

But… when I use the ‘apm publish minor’ I get the same error each time: “Package must be in a Git repository before publishing: https://help.github.com/articles/create-a-repo

I’m sorry to add to a long list of people with the same issue but I would really appreciate some step by step help.

With many many many thanks in advance,

Kate

I see you have code on the repository you linked. On the command line, what does git status say when run in the project root directory?

Hi Aerijo, thank you for your message. Here is a screen grab

Odd. Could you try running apm publish from there once more to see if it happens to work?

clarified below

clarified below

Apologies Aerijo, I realise my replies above are not too clear.

apm publish - got the same response as above - ‘Package must be in a Git repository…’

I am going to start from the beginning and see if that shakes things loose - please can you confirm one thing I am not clear about from the GitHub guide to making a bare clone:

$ git clone --bare external-host.com/extuser/repo.git

For me should this be: [github.com/katecooperuk/morticia] with no .git at the end?

or

[/Users/Kate/github/morticia] on my local machine?

Thank you for your help.

Ok so I tried again this time using Github desk top and got as far as entering my api token and then the error was that I didn’t have access. It now looks like it has been published as it is in my themes as an atom theme but with no page. I have no idea what to do now.

It is not published; if it were, https://atom.io/packages/morticia-syntax should resolve to it.

The error Registering package in atom/morticia-syntx ... indicates it thinks the repo owner is atom. This means the local copy’s package.json repository.url field looks something like https://github.com/atom/morticia-syntax.

Please make sure the local copy you have is the same as the one on GitHub.

It finally worked - thank you so much for your patience and sticking with me to resolve this. I’ve learned a lot about Github in the process so thank you for that too. :smile:

1 Like