@@ -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 %}
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user