Skip to content

Commit

Permalink
docs: Hint for work with GitHub private repos
Browse files Browse the repository at this point in the history
added note about actual auth types
  • Loading branch information
Paul Panin authored and twpayne committed Jan 24, 2023
1 parent ced09f1 commit 492e102
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
7 changes: 7 additions & 0 deletions assets/chezmoi.io/docs/install.md.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,13 @@ with a single command:
sh -c "$(curl -fsLS get.chezmoi.io)" -- init --apply $GITHUB_USERNAME
```

Private GitHub repos requires other
[authentication methods](https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls):

```sh
sh -c "$(curl -fsLS get.chezmoi.io)" -- init --apply git@github.com:$GITHUB_USERNAME/dotfiles.git
```

!!! hint

To install the chezmoi binary in a different directory, use the `-b` option,
Expand Down
18 changes: 18 additions & 0 deletions assets/chezmoi.io/docs/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,15 @@ On a second machine, initialize chezmoi with your dotfiles repo:
$ chezmoi init https://github.com/$GITHUB_USERNAME/dotfiles.git
```

!!! hint

Private GitHub repos requires other
[authentication methods](https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls):

```console
$ chezmoi init git@github.com:$GITHUB_USERNAME/dotfiles.git
```

This will check out the repo and any submodules and optionally create a chezmoi
config file for you.

Expand Down Expand Up @@ -188,6 +197,15 @@ shortened to:
$ chezmoi init --apply $GITHUB_USERNAME
```

!!! hint

Private GitHub repos requires other
[authentication methods](https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls):

```console
chezmoi init --apply git@github.com:$GITHUB_USERNAME/dotfiles.git
```

This command is summarized in this sequence diagram:

```mermaid
Expand Down

0 comments on commit 492e102

Please sign in to comment.