Pythonista
Pythonista

Reputation: 33

How to initialize a GitHub repo directly from Atom editor?

I am using Atom text editor and I want to connect it to GitHub. When I try to init and publish a repo to GitHub from Atom, it throws an error -

fatal: 'origin' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.

Didn't find anything good on the web. Tried to reinstall the github package using apm and the command line, but got an error: Failed to delete github: No package.json found at C:\Users\User\.atom\packages\github\package.json

System - Windows 10, Atom - latest version.

Thanks for any help!

Upvotes: 2

Views: 889

Answers (2)

Pythonista
Pythonista

Reputation: 33

Got it. You should publish a repo using GitHub Desktop app, it works well and then Atom will work.

Upvotes: 1

VonC
VonC

Reputation: 1324093

Switch to command line, just to check what origin is:

cd /path/to/local/repository
git remote -v

when I try to init

Initialize alone would not set the origin: you need to add it manually:

cd /path/to/local/repository
git remote add origin https://url/remote/repository

Upvotes: 1

Related Questions