Fork me on GitHub
#spacemacs
<
2020-05-22
>
drewverlee14:05:04

Is there a way to create a github repo from emacs? I see forge is included as a layer in spacemacs but i dont see a create repo option. Though that does seem to be listed in magithub.

practicalli-john15:05:08

@drewverlee I haven't tried this yet, but I believe you can create a repository on GitHub from within Magit, so , g s then @ for the forge menu, then c f to create a remote repository. You will need to create or select a local Git repository to run magit. Forge needs to be configured with GitHub first for this to work. There is a wizard for this, although there were quite a few reports of this not working well (especially if you have 2 factor on the GitHub account). It wasnt working when I tried about 5 months ago. I started documenting the manual Forge config here, although it needs to be tested. This is pulled from a few different pages across a couple of projects. https://practicalli.github.io/spacemacs/source-control/forge-configuration.html

👍 4
drewverlee13:05:00

The instructions you have mirror the manual setup + encryption from the official source. Forge still complains that it doesn't have a remote configured. ill search a bit more then given up 🙂

practicalli-john14:05:18

The forge menu has an menu item c f that says create fork or remote, however, the prompts refer more to fork than creating remotes. I am looking into this more

drewverlee14:05:32

dont sweat it. If i want it bad enough i'll figure it out 🙂. In the interim i worked out a script to create a github repo based on the repo name. https://github.com/drewverlee/gr/blob/master/src/gr.clj#L28

practicalli-john16:05:31

In the tests I've done so far, an existing remote is required before Magit forge works. I forked a repository from the practicalli org to my jr0cket account on GitHub, but Forge seems to fail if there is no remote at all. It is strange there is no way to create a GitHub repository from scratch.

drewverlee21:05:49

I mean, i have two factor on but creating a repo wasn't an issue from curl. It seems oddly lacking from the tools, maybe people haven't revisited this sense github got a more extensive api. idk