You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Chezmoi doesn't recognise Sourcehut (sr.ht) usernames as being valid when they contain (at least) underscores. This results in the low-friction setup failing when given an otherwise valid sr.ht/~user_name parameter.
To reproduce
$ chezmoi init --ssh sr.ht/~user_name
fatal: repository 'sr.ht/~user_name' does not exist
chezmoi: exit status 128
Expected behavior
$ chezmoi init --dry-run --ssh sr.ht/~username
Cloning into '/home/user/.local/share/chezmoi'...
Output of command with the --verbose flag
$ chezmoi --verbose init --ssh sr.ht/~user_namefatal: repository 'sr.ht/~user_name' does not existchezmoi: exit status 128
Output of chezmoi doctor
$ chezmoi doctorRESULT CHECK MESSAGEok version v2.27.1, commit b6039e787dfffe970fec4f9165ec9ebe1b3ceaa6, built at 2022-11-13T20:30:23Z, built by goreleaserok latest-version v2.27.1ok os-arch linux/amd64 (Debian GNU/Linux 11 (bullseye))ok uname Linux penguin 5.10.142-19739-g5899aa8f604c #1 SMP PREEMPT Tue Oct 25 18:21:49 PDT 2022 x86_64 GNU/Linuxok go-version go1.19.3 (gc)ok executable ~/.software/asdf/installs/chezmoi/2.27.1/bin/chezmoiok upgrade-method replace-executableok config-file no config file foundok source-dir ~/.local/share/chezmoi is a directoryok suspicious-entries no suspicious entriesok working-tree ~/.local/share/chezmoi is a directoryok dest-dir ~ is a directoryok umask 022ok cd-command found /bin/bashok cd-args /bin/bashinfo diff-command not setok edit-command found /usr/bin/viok edit-args /usr/bin/viok git-command found /usr/bin/git, version 2.34.1[... secret-related stuff removed; definitely not relevant! ]
Describe the bug
Chezmoi doesn't recognise Sourcehut (sr.ht) usernames as being valid when they contain (at least) underscores. This results in the low-friction setup failing when given an otherwise valid
sr.ht/~user_name
parameter.To reproduce
Expected behavior
Output of command with the
--verbose
flagOutput of
chezmoi doctor
Additional context
I've tracked down the Sourcehut username constraints, but only the human-readable error message that's given on signup failure:
Username must use only lowercase letters, digits, underscores, and dashes, and must start with a letter or underscore.
(https://git.sr.ht/~sircmpwn/meta.sr.ht/tree/master/item/api/graph/schema.resolvers.go#L624).The current quick-start regex doesn't include the underscore (https://github.com/twpayne/chezmoi/blob/758249eeb6db73a2b516a7afbe2a56972d94f0d5/pkg/cmd/initcmd.go).
The text was updated successfully, but these errors were encountered: