Git
Clone, auth, merge, and LFS errors in CI - resolved.
Fix Git failures in CI: clone and fetch errors, authentication and credential problems, shallow-clone issues, merge conflicts, and Git LFS failures. Clear, practical fixes.
Clone & fetch
Shallow clones, depth, and submodules.
"destination path already exists"Fix Git "fatal: destination path '...' already exists and is not an empty directory" in CI - a leftover
"detected dubious ownership"Fix Git "fatal: detected dubious ownership in repository at ..." in CI - the checkout is owned by a different
safe.directory exceptionConfigure Git safe.directory in CI for "fatal: detected dubious ownership in repository" - add the workspace
"couldn't find remote ref"Fix Git "fatal: couldn't find remote ref" in CI - checking out a branch, tag, or SHA that does not exist on
"fatal: early EOF"Fix Git "fatal: early EOF" and "fatal: index-pack failed" in CI - the pack transfer ended before all objects
"filtering not recognized by server"Fix Git partial-clone errors in CI - "fatal: --filter ... filtering not recognized by server" or missing
"RPC failed; curl 18"Fix Git "RPC failed; curl 18 transfer closed with outstanding read data" / "early EOF" on big clones in CI -
"RPC failed; HTTP 400"Fix Git "RPC failed; HTTP 400 curl 22 The requested URL returned error: 400" on a large push in CI - the
"redirecting to https"Fix Git "warning: redirecting to https://.../" in CI - an http:// or trailing-slash-less remote URL the host
"local changes would be overwritten"Fix Git "error: Your local changes to the following files would be overwritten by checkout/merge" in CI - a
Shallow clone, no historyFix shallow-clone failures in CI where git log, git describe, or a diff against the base branch breaks
Authentication
Tokens, SSH keys, and credentials.
"terminal prompts disabled"Fix git "fatal: could not read Username for 'https://github.com': terminal prompts disabled" in CI - a
"git failed with exit code 128"Fix "The process '/usr/bin/git' failed with exit code 128" from actions/checkout in CI - a generic git fatal
"Authentication failed" (token)Fix Git "fatal: Authentication failed for ..." when using a token in CI - an expired/revoked token, a
"Authentication failed for https://..."Fix the Git "fatal: Authentication failed" error for HTTPS in CI, caused by an invalid, expired, or
"could not read Username"Fix Git "fatal: could not read Username for ...: No such device or address" in CI - a credential prompt with
"could not read Username ... No such device"Fix the Git "could not read Username ... No such device or address" error in CI, caused by Git prompting for
"Authentication failed"Fix Git "fatal: Authentication failed for ..." over HTTPS in CI - a missing or invalid token, an expired
"could not read Username"Fix Git "fatal: could not read Username for ...: terminal prompts disabled" in CI - no token or credential
"fatal: not a git repository"Fix git "fatal: not a git repository (or any of the parent directories): .git" in CI - a git command ran in a
"fatal: repository not found"Fix git "fatal: repository not found" in CI - the remote returned 404, usually a private repo the token
"The requested URL returned error: 403"Fix git "fatal: unable to access ...: The requested URL returned error: 403" in CI - a later git step lost
"Permission denied (publickey)"Fix Git SSH "git@github.com: Permission denied (publickey)" in CI for deploy keys - the right private key is
"Host key verification failed"Fix the Git "Host key verification failed" error in CI over SSH, caused by github.com not being present in
"Host key verification failed"Fix Git "Host key verification failed" in CI - the Git host is not in known_hosts, so SSH aborts before
"Password authentication is not supported"Fix the GitHub "Support for password authentication was removed" CI error by switching HTTPS Git from an
"Permission denied (publickey)"Fix the Git "git@github.com: Permission denied (publickey)" error in CI, caused by a missing SSH key, an
"Permission denied (publickey)"Fix Git "git@github.com: Permission denied (publickey)" in CI - no SSH key loaded, the key not added to the
"Invalid username or password"Fix Git "remote: Invalid username or password" over HTTPS in CI - a wrong/empty credential, a password where
"SSL certificate problem"Fix Git "SSL certificate problem: self signed certificate in certificate chain" in CI - a missing CA bundle
"GITHUB_TOKEN ... Permission ... denied"Fix the GitHub Actions "Permission to org/repo.git denied to github-actions[bot]" push error, caused by the
"403" - insufficient token scopeFix Git "remote: Permission ... denied" / 403 in CI - a PAT, fine-grained token, or GITHUB_TOKEN that
"kex_exchange_identification"Fix Git SSH "kex_exchange_identification: Connection closed by remote host" in CI - the SSH handshake was cut
"Load key: invalid format"Fix Git SSH "Load key ...: invalid format" in CI - a private key stored without a trailing newline, with CRLF
"Too many authentication failures"Fix Git SSH "Received disconnect ... Too many authentication failures" in CI - the agent offers too many keys
"failed to clone ... submodule"Fix Git submodule authentication failures in CI, where the parent repo clones fine but a private submodule
"password authentication was removed"Fix GitHub "Support for password authentication was removed. Please use a personal access token instead." in
Private submodule auth in CIFix private submodule authentication in CI - the parent repo checks out but a private submodule fails to
"Permission denied (publickey)"Fix git submodule "git@github.com: Permission denied (publickey)" in CI - a submodule declared with an SSH
Explore other topics
GitHub ActionsWorkflow, runner, and YAML errors - diagnosed and fixed.
Node.js & npmnpm, yarn, and pnpm failures in CI - solved.
DockerBuild, run, compose, and registry errors - explained.
Pythonpip, poetry, venv, and pytest failures - fixed.
Java & JVMMaven, Gradle, and JVM failures in CI - resolved.
GoGo build, module, and test failures - diagnosed.