twpayne / chezmoi

Manage your dotfiles across multiple diverse machines, securely.
https://www.chezmoi.io/
MIT License
13.27k stars 493 forks source link

Chezmoi init user/repo and site/user/repo does not work. #2816

Closed EvanCarroll closed 1 year ago

EvanCarroll commented 1 year ago

My username on GitHub is EvanCarroll. My repo on github is dotfiles_chezmoi the documented syntax of

chezmoi init EvanCarroll/dotfiles_chezmoi

does not work, as seen here:

$ chezmoi init EvanCarroll/dotfiles_chezmoi
fatal: repository 'EvanCarroll/dotfiles_chezmoi' does not exist
chezmoi: exit status 128

This is how it's documented

        PATTERN      |                HTTPS REPO                 |  SSH REPO
  -------------------+-------------------------------------------+-----------------------------------
    user/repo        | https://user@github.com/user/repo.git     |  git@github.com:user/repo.git

You can also see it documented in the Examples,

chezmoi init user/dots

This one also doesn't, though documented to work...

$ chezmoi init github.com/EvanCarroll/dotfiles_chezmoi
fatal: repository 'github.com/EvanCarroll/dotfiles_chezmoi' does not exist
chezmoi: exit status 128
bradenhilton commented 1 year ago

I can reproduce:

❯ docker run --rm -it chezmoi-linux
$ chezmoi init EvanCarroll/dotfiles_chezmoi
fatal: repository 'EvanCarroll/dotfiles_chezmoi' does not exist
chezmoi: exit status 128
$ chezmoi init github.com/EvanCarroll/dotfiles_chezmoi
fatal: repository 'github.com/EvanCarroll/dotfiles_chezmoi' does not exist
chezmoi: exit status 128

You can work around it for now with chezmoi init --guess-repo-url=false https://github.com/EvanCarroll/dotfiles_chezmoi:

$ chezmoi init --guess-repo-url=false https://github.com/EvanCarroll/dotfiles_chezmoi
Cloning into '/home/user/.local/share/chezmoi'...
remote: Enumerating objects: 43, done.
remote: Counting objects: 100% (43/43), done.
remote: Compressing objects: 100% (27/27), done.
remote: Total 43 (delta 12), reused 36 (delta 5), pack-reused 0
Receiving objects: 100% (43/43), 26.38 KiB | 4.40 MiB/s, done.
Resolving deltas: 100% (12/12), done.