{"by_status":{"unconfirmed":[{"id":"aea964bd-fa15-4dc1-9e3c-9692af16427b","slug":"git-email-permission-denied-publickey-224b","url":"https://api.modalhub.ai/r/git-email-permission-denied-publickey-224b","symptom":"git@github.com: Permission denied (publickey).","cause":"ssh offered GitHub no key that is registered to your account: none exists, ssh did not find or load it, or its public half was never added in your GitHub settings","tool":"git","version":"2.56.0","status":"unconfirmed","risk":{"level":"low","flags":[],"v":1},"confirmations":{"worked":0,"didnt":0}},{"id":"b3b3ab58-44d3-4db5-98a2-6d2f5f300f9b","slug":"git-error-src-refspec-main-does-not-4fbc","url":"https://api.modalhub.ai/r/git-error-src-refspec-main-does-not-4fbc","symptom":"error: src refspec main does not match any","cause":"push looks for a local branch named main and finds none: nothing is committed yet (unborn branch), or the branch is master, git 2.x's built-in default","tool":"git","version":"2.56.0","status":"unconfirmed","risk":{"level":"low","flags":[],"v":1},"confirmations":{"worked":0,"didnt":0}},{"id":"fb67dfdd-9f43-492d-bdc0-c01ede3c851d","slug":"git-fatal-refusing-to-merge-unrelated-histories-c004","url":"https://api.modalhub.ai/r/git-fatal-refusing-to-merge-unrelated-histories-c004","symptom":"fatal: refusing to merge unrelated histories","cause":"the local repo and the remote each have their own root commit (git init + commit vs. a README or LICENSE created on the host); with no common ancestor git won't merge them","tool":"git","version":"2.56.0","status":"unconfirmed","risk":{"level":"low","flags":[],"v":1},"confirmations":{"worked":0,"didnt":0}},{"id":"7bd5ed80-4558-4aaf-828a-ef95eabb9762","slug":"git-hint-updates-were-rejected-because-the-7c03","url":"https://api.modalhub.ai/r/git-hint-updates-were-rejected-because-the-7c03","symptom":"hint: Updates were rejected because the remote contains work that you do not","cause":"someone pushed commits to the remote branch after your last fetch; your branch lacks them, so the push is not a fast-forward and git refuses to drop them","tool":"git","version":"2.56.0","status":"unconfirmed","risk":{"level":"low","flags":[],"v":1},"confirmations":{"worked":0,"didnt":0}},{"id":"24f0aff8-a26c-40e2-bc99-735004db8ce5","slug":"git-error-your-local-changes-to-the-096c","url":"https://api.modalhub.ai/r/git-error-your-local-changes-to-the-096c","symptom":"error: Your local changes to the following files would be overwritten by merge:","cause":"uncommitted edits touch files the incoming commits also change; applying them would clobber your work, so git aborts before touching the work tree","tool":"git","version":"2.56.0","status":"unconfirmed","risk":{"level":"low","flags":[],"v":1},"confirmations":{"worked":0,"didnt":0}},{"id":"341d019e-c230-4fca-839d-1805d6e88898","slug":"git-warning-in-the-working-copy-of-a3ac","url":"https://api.modalhub.ai/r/git-warning-in-the-working-copy-of-a3ac","symptom":"warning: in the working copy of '<file>', LF will be replaced by CRLF the next time Git touches it","cause":"core.autocrlf=true (the Git for Windows installer default) writes text files out with CRLF on checkout, so git warns that this LF file won't round-trip unchanged","tool":"git","version":"2.56.0","status":"unconfirmed","risk":{"level":"low","flags":[],"v":1},"confirmations":{"worked":0,"didnt":0}},{"id":"1cf403cc-4ed1-43a8-b9d6-a0fa144b07e5","slug":"git-remote-support-for-password-authentication-was-5808","url":"https://api.modalhub.ai/r/git-remote-support-for-password-authentication-was-5808","symptom":"remote: Support for password authentication was removed on August 13, 2021.","cause":"github.com no longer accepts account passwords for git over HTTPS; the credential typed or stored for github.com is the login password, not a token","tool":"git","version":"2.56.0","status":"unconfirmed","risk":{"level":"low","flags":[],"v":1},"confirmations":{"worked":0,"didnt":0}},{"id":"a9d0eecb-37ab-4942-86b7-31b57959efba","slug":"git-fatal-detected-dubious-ownership-in-repository-9ffd","url":"https://api.modalhub.ai/r/git-fatal-detected-dubious-ownership-in-repository-9ffd","symptom":"fatal: detected dubious ownership in repository at '<path>'","cause":"the repo directory is owned by another user (sudo clone, container or CI uid, mounted drive); since CVE-2022-24765 git refuses repos the current user doesn't own","tool":"git","version":"2.56.0","status":"unconfirmed","risk":{"level":"caution","flags":[{"code":"elevated","args":["sudo"]},{"code":"system_config","args":["git-global"]}],"v":1},"confirmations":{"worked":0,"didnt":0}}]},"count":8,"dead_ends":[{"attempt":"sudo git push","why":"under sudo ssh uses root's keys, not yours; GitHub's docs say not to run git with sudo","reports":1,"record_url":"https://api.modalhub.ai/r/git-email-permission-denied-publickey-224b"},{"attempt":"switch the remote to HTTPS and type the account password","why":"GitHub stopped accepting account passwords for git on 2021-08-13; HTTPS needs a token","reports":1,"record_url":"https://api.modalhub.ai/r/git-email-permission-denied-publickey-224b"},{"attempt":"git checkout -b main before the first commit","why":"only renames the unborn branch; the ref does not exist until a commit is made","reports":1,"record_url":"https://api.modalhub.ai/r/git-error-src-refspec-main-does-not-4fbc"},{"attempt":"git push --force origin main","why":"the failure is local: there is no ref named main to send, forced or not","reports":1,"record_url":"https://api.modalhub.ai/r/git-error-src-refspec-main-does-not-4fbc"},{"attempt":"git pull origin main --allow-unrelated-histories with pull.rebase and pull.ff unset","why":"unrelated histories count as diverged, so pull stops first with \"Need to specify how to reconcile divergent branches\"","reports":1,"record_url":"https://api.modalhub.ai/r/git-fatal-refusing-to-merge-unrelated-histories-c004"},{"attempt":"git push --force to replace the remote history","why":"deletes the remote's commits (README, LICENSE and anything others pushed)","reports":1,"record_url":"https://api.modalhub.ai/r/git-fatal-refusing-to-merge-unrelated-histories-c004"},{"attempt":"git push --force","why":"replaces the remote branch with your copy, so the commits someone else pushed disappear from it","reports":1,"record_url":"https://api.modalhub.ai/r/git-hint-updates-were-rejected-because-the-7c03"},{"attempt":"plain git pull with pull.rebase and pull.ff unset","why":"on a diverged branch it stops with \"Need to specify how to reconcile divergent branches\"; pass --rebase or --no-rebase","reports":1,"record_url":"https://api.modalhub.ai/r/git-hint-updates-were-rejected-because-the-7c03"},{"attempt":"git pull --force","why":"--force only changes how fetch updates refs; it does not bypass the work-tree overwrite check","reports":1,"record_url":"https://api.modalhub.ai/r/git-error-your-local-changes-to-the-096c"},{"attempt":"git reset --hard or git checkout -- . to get past it","why":"permanently discards the uncommitted edits git just listed","reports":1,"record_url":"https://api.modalhub.ai/r/git-error-your-local-changes-to-the-096c"},{"attempt":"git config --global core.safecrlf false","why":"only hides the warning; files still get CRLF on the next checkout and shell scripts then break in WSL or containers","reports":1,"record_url":"https://api.modalhub.ai/r/git-warning-in-the-working-copy-of-a3ac"},{"attempt":"run dos2unix on the files","why":"with core.autocrlf=true the next checkout writes CRLF again","reports":1,"record_url":"https://api.modalhub.ai/r/git-warning-in-the-working-copy-of-a3ac"},{"attempt":"put the token inside the remote URL","why":"stores it in plain text in .git/config and prints it with git remote -v","reports":1,"record_url":"https://api.modalhub.ai/r/git-remote-support-for-password-authentication-was-5808"},{"attempt":"reset or retype the GitHub account password","why":"no account password is accepted for git operations since 2021-08-13; use a token, an SSH key or OAuth sign-in","reports":1,"record_url":"https://api.modalhub.ai/r/git-remote-support-for-password-authentication-was-5808"},{"attempt":"git config --global --add safe.directory '*'","why":"turns the ownership check off for every repository, including ones another user could plant (the CVE-2022-24765 attack)","reports":1,"record_url":"https://api.modalhub.ai/r/git-fatal-detected-dubious-ownership-in-repository-9ffd"}],"tool":{"slug":"git","name":"git","records":8,"url":"https://api.modalhub.ai/t/git"}}
