1
0
mirror of synced 2026-01-10 00:03:04 -05:00

Merge pull request #22810 from github/repo-sync

repo sync
This commit is contained in:
Octomerger Bot
2021-11-12 16:37:42 -05:00
committed by GitHub
2 changed files with 12 additions and 6 deletions

View File

@@ -147,6 +147,12 @@ To include a title for the new key, use the `-t` or `--title` flag.
gh ssh-key add <em>key-file</em> --title "personal laptop"
```
If you generated your SSH key by following the instructions in "[Generating a new SSH key](/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent)", you can add the key to your account with this command.
```shell
gh ssh-key add ~/.ssh/id_ed25519.pub
```
{% endcli %}
{% ifversion fpt or ghec %}

View File

@@ -87,13 +87,13 @@ If you want to mirror a repository in another location, including getting update
$ cd <em>repository-to-mirror</em>
$ git remote set-url --push origin https://{% data variables.command_line.codeblock %}/<em>exampleuser</em>/<em>mirrored</em>
```
As with a bare clone, a mirrored clone includes all remote branches and tags, but all local references will be overwritten each time you fetch, so it will always be the same as the original repository. Setting the URL for pushes simplifies pushing to your mirror.
As with a bare clone, a mirrored clone includes all remote branches and tags, but all local references will be overwritten each time you fetch, so it will always be the same as the original repository. Setting the URL for pushes simplifies pushing to your mirror. To update your mirror, fetch updates and push.
```shell
$ git fetch -p origin
$ git push --mirror
```
4. To update your mirror, fetch updates and push.
```shell
$ git fetch -p origin
$ git push --mirror
```
{% ifversion fpt or ghec %}
## Further reading