gastownhall/beads · error
remote name too long (max 64 characters)
Error message
remote name too long (max 64 characters)
What it means
ValidateRemoteName caps remote names at 64 bytes because they are embedded into Dolt config paths and identifiers; longer names risk ambiguity and storage issues. The check is on byte length (len), so multibyte characters count more heavily.
Source
Thrown at internal/remotecache/url.go:197
// Already matched gitSSHPattern, so structure is valid.
// Extract host and verify no control chars (already checked above).
atIdx := strings.Index(rawURL, "@")
colonIdx := strings.Index(rawURL[atIdx:], ":")
if atIdx < 0 || colonIdx < 0 {
return fmt.Errorf("SCP-style URL must be in user@host:path format")
}
return nil
}
// ValidateRemoteName checks that a remote name is safe for use as a Dolt
// remote identifier. Names must start with a letter and contain only
// alphanumeric characters, hyphens, and underscores. Max 64 characters.
func ValidateRemoteName(name string) error {
if name == "" {
return fmt.Errorf("remote name cannot be empty")
}
if len(name) > 64 {
return fmt.Errorf("remote name too long (max 64 characters)")
}
if strings.HasPrefix(name, "-") {
return fmt.Errorf("remote name must not start with a dash")
}
if !validRemoteNameRegex.MatchString(name) {
return fmt.Errorf("remote name must start with a letter and contain only alphanumeric characters, hyphens, and underscores")
}
return nil
}
// MatchesRemotePattern checks whether a URL matches a glob-style pattern.
// Patterns use path.Match semantics (e.g., "dolthub://myorg/*").
func MatchesRemotePattern(rawURL, pattern string) bool {
matched, err := path.Match(pattern, rawURL)
if err != nil {
return false
}
return matchedView on GitHub (pinned to 71377f2769)
Solutions
- Shorten the name to 64 characters or fewer (e.g. use a short alias like 'origin').
- Move the long value to the URL argument; the name should be a local alias only.
- Note len() counts bytes — non-ASCII names hit the cap sooner; prefer ASCII names.
Example fix
// before
ValidateRemoteName("https://dolthub.com/myorg/a-very-long-repository-name-that-exceeds-the-limit")
// after
ValidateRemoteName("origin") Defensive patterns
Strategy: validation
Validate before calling
if len(name) > 64 {
return fmt.Errorf("remote name must be at most 64 characters")
} Try / catch
if err := remotecache.ValidateRemoteName(name); err != nil {
if strings.Contains(err.Error(), "too long") {
name = name[:64]
}
return err
} Prevention
- Treat remote names as short aliases, never URLs or paths.
- Truncate or hash long generated names before use.
- Prefer ASCII names since the limit counts bytes.
When it happens
Trigger: Calling ValidateRemoteName with a string longer than 64 characters, e.g. a full URL or org/repo path pasted into the name slot instead of a short identifier.
Common situations: Users pasting `https://dolthub.com/org/very-long-repo-name` as the remote name instead of the URL field; generated names from pipelines exceeding the cap.
Related errors
- remote name must start with a letter and contain only alphan
- remote target %s is non-empty but is neither a bare git repo
- invalid childRef '%s': must be alphanumeric, dash, underscor
- remote name cannot be empty
- remote name must not start with a dash
AI-assisted analysis of gastownhall/beads@71377f2769 (2026-08-30).
Data as JSON: /api/errors/fae79ab4208f6377.
Report an issue: GitHub.