Fix Git that will not pull
We'll check the remote URL, authentication (SSH or HTTPS), merge conflicts, and network—or tell you when to escalate.
What you'll need
- Git installed and a repository
- Access to the remote (GitHub, GitLab, etc.)
At a glance
- Run `git pull -v` to see the exact error (merge conflict, auth failed, connection refused).
- Check the remote URL with `git remote -v`—SSH vs HTTPS affects authentication.
- If merge conflict: resolve conflicts in the listed files, then `git add` and `git commit`, or run `git merge --abort` to cancel.
- For SSH: check `~/.ssh/id_ed25519` or `~/.ssh/id_rsa` exists and `ssh -T [email protected]` works.
- Confirm the remote is reachable with git fetch or ping the host.
Quick triage — pick your path
Quick triage — pick your path
Choose the option that matches what you see. You can jump straight to that section.
Steps
Goal: Identify why pull fails, then fix remote URL, auth, merge conflicts, or network.
- Run
git pull -vand note the error: merge conflict, authentication failed, connection refused, or “Could not read from remote”. - Good: You see the exact failure. Proceed to Check the remote URL.
- Bad: No clear error—check network and that the remote host is reachable.
Check the remote URL
Goal: Confirm the remote uses SSH or HTTPS and matches your auth setup.
- Run
git remote -v. SSH URLs look like[email protected]:user/repo.git; HTTPS likehttps://github.com/user/repo.git. - If SSH: keys must be set up. If HTTPS: credentials or token must be valid.
- Good: The URL matches your auth method. Proceed to Fix merge conflict or Fix auth based on the error.
- Bad: Wrong URL—run
git remote set-url origin <correct-url>.
Fix merge conflict
Goal: Resolve conflicts from pull or cancel the merge.
- Open the conflicted files and look for
<<<<<<<,=======,>>>>>>>markers. Edit to keep the version you want, remove the markers. - Run
git addfor each resolved file, thengit commit. Or rungit merge --abortto cancel. - Good: Conflicts resolved and commit succeeds.
- Bad: Many conflicts—see fix-git-says-merge-conflict.
Fix SSH or HTTPS auth
Goal: Fix permission denied or authentication failed.
- For SSH: run
ssh -T [email protected](or your host). Confirm~/.sshis 700 and the key file is 600. Add the public key to the host if missing. - For HTTPS: use a PAT instead of a password. Run
git pulland enter the token when prompted. - Good: Auth succeeds and pull works.
- Bad: Key not added, wrong token, or proxy—see When to escalate.
When to escalate
Escalate if:
- The repo uses deploy keys or CI tokens you cannot change.
- The host is behind a corporate proxy.
- You get “repository not found” and you have confirmed access.
Provide git pull -v output and git remote -v.
Verification
git pullcompletes without error.git statusshows “Your branch is up to date with origin/branch” or “nothing to commit, working tree clean.”- No unmerged paths.
Escalation ladder
Work from the device outward. Stop when the problem is fixed.
- Check pull error Run git pull -v to identify the failure.
- Remote and network Check git remote -v and git fetch.
- Fix merge conflict Resolve markers or git merge --abort.
- Fix auth SSH—test ssh -T; HTTPS—use PAT.
- Escalate Provide git pull -v and git remote -v.
What to capture if you need help
Before calling support or posting for help, have these ready. It speeds everything up.
- git pull -v output
- git remote -v output
- git status (if merge in progress)
- Steps already tried
Reviewed by Blackbox Atlas
Frequently asked questions
- Why would Git pull fail?
- Common causes: merge conflicts, wrong or expired credentials, SSH key not loaded, network unreachable, or the remote branch does not exist. Run git pull -v to see the error.
- What if I get a merge conflict during pull?
- Edit the conflicted files, remove the conflict markers, then git add and git commit. Or run git merge --abort to cancel the pull and return to the previous state.
- How do I fix SSH authentication for Git?
- Confirm your key exists (~/.ssh/id_ed25519 or id_rsa), add it to the host (GitHub, GitLab, etc.), and test with ssh -T [email protected]. Check key permissions: ~/.ssh 700, key file 600.
Rate this guide
Was this helpful?
Thanks for your feedback.