2024-09-17 11:32:57 -04:00
|
|
|
# Commonwealth Robotics Git Repository
|
|
|
|
|
|
|
|
This is a [Gitea](https://about.gitea.com/) instance, which will feel similar
|
|
|
|
to GitHub if you've used it. If you want an account, [email
|
|
|
|
me](mailto:jsignorovitch@commschool.org).
|
|
|
|
|
|
|
|
## Pushing to a Repository
|
|
|
|
|
2024-09-17 11:40:25 -04:00
|
|
|
For the security and ease of use, I suggest using `ssh` to push changes. This
|
|
|
|
guide will assume a UNIX-based operating environment (e.g. MacOS, Linux).
|
|
|
|
First, generate an ssh key pair.
|
|
|
|
|
2024-09-17 12:47:34 -04:00
|
|
|
```bash
|
2024-09-17 11:40:25 -04:00
|
|
|
$ ssh-keygen -f ~/.ssh/git.signorovitch.org
|
|
|
|
```
|
|
|
|
|
|
|
|
You don't need to set a password (just hit enter). This will create the files
|
|
|
|
`~/.ssh/git.signorovitch.org` and `~/.ssh/git.signorovitch.org.pub`, being your
|
|
|
|
private and public keys respectively. Using the Gitea web interface, click on
|
|
|
|
your profile in the top right corner. Go to Settings → SSH/GPG Keys → Manage
|
2024-09-17 11:41:49 -04:00
|
|
|
SSH Keys. Click 'Add Key' and paste your **PUBLIC** key
|
|
|
|
(`~/.ssh/git.signorovitch.org.pub`) into the text box. You should now be able
|
|
|
|
to commit changes via ssh.
|
2024-09-17 12:47:34 -04:00
|
|
|
|
|
|
|
To confirm your configuration works, try commiting to this repository:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
$ git clone git@git.signorovitch.org:commonwealth-robotics/docs.git
|
|
|
|
$ cd docs
|
|
|
|
$ echo "Something" >> user-tests/yourname.txt
|
2024-09-17 13:07:20 -04:00
|
|
|
$ git add user-tests/*
|
2024-09-17 12:47:34 -04:00
|
|
|
$ git commit -am "Your fancy commit message"
|
|
|
|
$ git push
|
|
|
|
```
|
2024-09-17 13:07:20 -04:00
|
|
|
|
|
|
|
If it asks for a password on the `clone` step, try:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
$ ssh-agent $SHELL
|
|
|
|
$ ssh-add ~/.ssh/git.signorovitch.org
|
|
|
|
```
|