Skip to content

Commit 98f76b1

Browse files
Give an example of how to add a key comment
Co-authored-by: rr-james-hickman <james.hickman@rakuten.com>
1 parent cb8b210 commit 98f76b1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ When using **Github deploy keys**, GitHub servers will accept the _first_ known
6868

6969
To support picking the right key in this use case, this action scans _key comments_ and will set up extra Git and SSH configuration to make things work.
7070

71-
1. When creating the deploy key for a repository like `git@github.com:owner/repo.git` or `https://github.com/owner/repo`, put that URL into the key comment.
71+
1. When creating the deploy key for a repository like `git@github.com:owner/repo.git` or `https://github.com/owner/repo`, put that URL into the key comment. (Hint: Try `ssh-keygen ... -C "git@github.com:owner/repo.git"`.)
7272
2. After keys have been added to the agent, this action will scan the key comments.
7373
3. For key comments containing such URLs, a Git config setting is written that uses [`url.<base>.insteadof`](https://git-scm.com/docs/git-config#Documentation/git-config.txt-urlltbasegtinsteadOf). It will redirect `git` requests to URLs starting with either `https://github.com/owner/repo` or `git@github.com:owner/repo` to a fake hostname/URL like `git@...some.hash...:owner/repo`.
7474
4. An SSH configuration section is generated that applies to the fake hostname. It will map the SSH connection back to `github.com`, while at the same time pointing SSH to a file containing the appropriate key's public part. That will make SSH use the right key when connecting to GitHub.com.

0 commit comments

Comments
 (0)