Skip to content

Commit 8e46442

Browse files
authored
Merge pull request #22810 from github/repo-sync
repo sync
2 parents 6b922d5 + 04b37a5 commit 8e46442

2 files changed

Lines changed: 12 additions & 6 deletions

File tree

content/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,12 @@ To include a title for the new key, use the `-t` or `--title` flag.
147147
gh ssh-key add <em>key-file</em> --title "personal laptop"
148148
```
149149

150+
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.
151+
152+
```shell
153+
gh ssh-key add ~/.ssh/id_ed25519.pub
154+
```
155+
150156
{% endcli %}
151157

152158
{% ifversion fpt or ghec %}

content/repositories/creating-and-managing-repositories/duplicating-a-repository.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -87,13 +87,13 @@ If you want to mirror a repository in another location, including getting update
8787
$ cd <em>repository-to-mirror</em>
8888
$ git remote set-url --push origin https://{% data variables.command_line.codeblock %}/<em>exampleuser</em>/<em>mirrored</em>
8989
```
90+
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.
9091

91-
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.
92-
93-
```shell
94-
$ git fetch -p origin
95-
$ git push --mirror
96-
```
92+
4. To update your mirror, fetch updates and push.
93+
```shell
94+
$ git fetch -p origin
95+
$ git push --mirror
96+
```
9797
{% ifversion fpt or ghec %}
9898
## Further reading
9999

0 commit comments

Comments
 (0)