diff options
Diffstat (limited to 'creating-a-repo-from-scratch.md')
| -rw-r--r-- | creating-a-repo-from-scratch.md | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/creating-a-repo-from-scratch.md b/creating-a-repo-from-scratch.md new file mode 100644 index 0000000..1e0b369 --- /dev/null +++ b/creating-a-repo-from-scratch.md @@ -0,0 +1,61 @@ +# Creating a new repo from scratch + +This works for anyone in the `@creators` gitolite group (currently +`bryan` and `red`). You don't need to ask an admin to declare the repo +first — pushing to a name under your own `personal/<you>/...` namespace +creates it automatically. + +## 1. Pick a name + +``` +personal/<your-username>/<reponame> +``` + +e.g. `personal/bryan/my-project`. You can only create repos under your +own username segment — gitolite checks the pushing user's identity +against that path component, so `red` can create `personal/red/...` but +gets denied on `personal/bryan/...`. + +## 2. Clone the (not-yet-existing) repo + +```bash +git clone git@git.veltar.systems:personal/bryan/my-project +``` + +Git will warn "you appear to have cloned an empty repository" — that's +expected, it doesn't exist on the server yet. + +## 3. Add something and push + +```bash +cd my-project +echo "# my-project" > README.md +git add README.md +git commit -m "Initial commit" +git push -u origin master # or main, whichever branch you're on +``` + +That push is what actually creates the bare repo on gwaihir. From here +on it's a completely normal git remote. + +## 4. (Optional) give someone else access + +You own this repo (`RW+`) and can grant others access yourself, without +an admin editing any config: + +```bash +ssh git@git.veltar.systems perms personal/bryan/my-project + RW someone +``` + +Use `RW+` instead of `RW` if they should also be able to force-push / +rewrite history. To revoke, replace `+` with `-`: + +```bash +ssh git@git.veltar.systems perms personal/bryan/my-project - RW someone +``` + +## What this doesn't do + +Creating the repo does **not** make it visible on the web UI +(`git.veltar.systems`) — it's SSH-only until an admin explicitly adds it +to cgit's config. See [making-a-repo-public.md](making-a-repo-public.md). |
