juanfont/headscale · error · ErrSSHWildcardDestination
%w; use 'autogroup:member' for user-owned devices, 'autogrou
Error message
%w; use 'autogroup:member' for user-owned devices, 'autogroup:tagged' for tagged devices, or specific tags/users
What it means
Error "%w; use 'autogroup:member' for user-owned devices, 'autogroup:tagged' for tagged devices, or specific tags/users" thrown in juanfont/headscale.
Source
Thrown at hscontrol/policy/v2/types.go:2937
return nil
}
func (a *SSHDstAliases) UnmarshalJSON(b []byte) error {
var aliases []AliasEnc
err := json.Unmarshal(b, &aliases, policyJSONOpts...)
if err != nil {
return err
}
*a = make([]Alias, len(aliases))
for i, alias := range aliases {
switch alias.Alias.(type) {
case *Username, *Tag, *AutoGroup, *Host:
(*a)[i] = alias.Alias
case Asterix:
return fmt.Errorf("%w; use 'autogroup:member' for user-owned devices, "+
"'autogroup:tagged' for tagged devices, or specific tags/users",
ErrSSHWildcardDestination)
default:
return fmt.Errorf("%w: %T", ErrSSHDestAliasNotSupported, alias.Alias)
}
}
return nil
}
// MarshalJSON marshals the [SSHDstAliases] to JSON.
func (a SSHDstAliases) MarshalJSON() ([]byte, error) {
if a == nil {
return []byte("[]"), nil
}
aliases := make([]string, len(a))
for i, alias := range a {View on GitHub (pinned to 565fd254d0)
Solutions
- Inspect the wrapped error for the underlying cause and correct the failing condition (; use 'autogroup); retry the operation after fixing the input, configuration, or environment.
Example fix
Inspect the wrapped error for the underlying cause and correct the failing condition (; use 'autogroup); retry the operation after fixing the input, configuration, or environment.
When it happens
Trigger: Thrown at hscontrol/policy/v2/types.go:2937 when the library encounters an invalid state.
Common situations: An overly broad alias was used where a narrower one is required. Use autogroup:member, autogroup:tagged, or specific tags/users as the message suggests.
AI-assisted analysis of juanfont/headscale@565fd254d0 (2026-08-15).
Data as JSON: /api/errors/54bb82176ed1c05c.
Report an issue: GitHub.