Diagnosing Sourcetree HTTPS Authentication and Fetch Issues
Diagnose and fix Sourcetree HTTPS authentication and fetch problems with a step‑by‑step table, ordered checks, and clear escalation paths.
26 Nov 2025, 09:18 UTC

Recognizable Condition
When Sourcetree repeatedly asks for a username and password, shows “Authentication failed”, or reports connection timeouts while trying to fetch, pull, or push over HTTPS, the problem usually lies outside the Git repository itself.
Cause and Diagnostic Table
| Cause | Typical Symptom | Quick Check |
|---|---|---|
| Missing or outdated HTTPS credentials in the OS credential manager | Repeated login prompts; “Authentication failed” after entering correct credentials | Run git ls-remote https://example.com/user/repo.git in a terminal; if it asks for credentials or fails, the credential store is the issue |
| Proxy configuration interfering with Git traffic | Connection timeout, “Could not resolve host”, or empty response despite a valid URL | Check environment variables HTTP_PROXY, HTTPS_PROXY, or run git config --global --get http.proxy; then try curl -v https://example.com to see if the proxy forwards the request |
| Repository URL uses an unsupported protocol or blocked port | “Repository not found” or “Access denied” after the URL is accepted | Verify the URL begins with https:// and uses the standard port 443; try opening the URL in a browser |
| Git LFS extension missing or misconfigured | Pull succeeds but LFS objects appear as pointer text or show “Git LFS: error: insufficient permission” | Run git lfs ls-files; if the command is not found or returns an error, LFS is not installed |
| Corrupted Sourcetree local cache or metadata | UI shows stale branch list, tags, or fails to refresh after remote changes | Close Sourcetree, locate the Application Data\\\\Atlassian\\\\SourceTree folder (Windows) or ~/Library/Application Support/SourceTree (macOS) and rename the bookmarks file; reopen and see if the repository list refreshes |
Ordered Checks
-
Verify HTTPS credentials. On Windows open Credential Manager → Windows Credentials → look for
git:https://example.com. On macOS open Keychain Access and search for the same host. On Linux ensure thecredential.helperis configured (e.g.,git config --global credential.helper). If the entry is missing or shows an old password, update it with the correct personal access token or password. After updating, rungit ls-remote https://example.com/user/repo.gitfrom a terminal; success is a list of refs without a password prompt. -
Check proxy settings. Determine whether a proxy is required by your network. Run
env | grep -i proxy(Linux/macOS) orGet-Item Env:\\HTTP_PROXY(PowerShell). If a proxy is set, confirm that Git respects it:git config --global --get http.proxy. Test withcurl -v -x http://proxyhost:port https://example.com. If the test works, configure Sourcetree to use the same proxy viaTools → Options → Network(or the equivalent preference pane). If no proxy is needed, unset any Git proxy:git config --global --unset http.proxyandgit config --global --unset https.proxy. -
Validate the repository URL. Copy the URL from Sourcetree’s
Repository → Repository Settings → Remotepane. Ensure it starts withhttps://and uses port 443 (implicit). Paste the URL into a web browser; you should see the repository hosting page or a 404 if the repo is private but you are authenticated. If the browser shows a certificate error, note that Sourcetree uses the system’s trust store; update the root certificates if necessary. -
Confirm Git LFS is installed. Run
git lfs version. If the command is not found, install LFS according to your platform (brew install git-lfson macOS,sudo apt-get install git-lfson Ubuntu, or the installer from ). Then, inside the repository, rungit lfs installto activate the hook filters. Finally, pull again and verify that binary files appear with their expected size rather than pointer text. -
Clear Sourcetree cache (last resort). Close Sourcetree. Locate the cache folder:
%LOCALAPPDATA%\\Atlassian\\SourceTreeon Windows or~/Library/Application Support/SourceTreeon macOS. Rename thebookmarksfile tobookmarks.bak. Reopen Sourcetree and re‑add the repository usingFile → Add / Clone Repository. This operation only resets UI state (window layout, recent‑repo list); the Git repository on disk is unchanged.
Fixes Tied to Findings
- If the credential manager entry was stale, updating it resolves repeated login prompts.
- If a proxy was misconfigured, aligning Git’s proxy with the network’s HTTP/HTTPS proxy eliminates timeout errors.
- If the URL used
git://or a non‑standard port, switching tohttps://restores access. - If Git LFS was missing, installing it and running
git lfs pullretrieves the actual large files. - If the cache was corrupted, renaming the bookmarks file forces Sourcetree to rebuild its metadata, clearing stale branch displays.
Escalation Criteria
Escalate to your team’s infrastructure or Git hosting administrator when:
- Credential updates succeed in the terminal but Sourcetree still prompts, indicating a possible bug in the Sourcetree version.
- Proxy tests succeed with
curlbut Sourcetree fails despite identical proxy settings, suggesting the application ignores system proxy configuration. - The repository URL works in a browser and via
git ls-remotebut Sourcetree reports “Repository not found” after multiple attempts, which may point to a corrupted internal URL cache. - Git LFS is installed and
git lfs ls-filesshows objects, yet Sourcetree continues to display pointer files, which could require a reinstall of the Sourcetree LFS integration.
In these cases, capture the exact error message, the Sourcetree version (found in Help → About SourceTree), and the output of git -c core.fsyncObjectFiles=0 ls-remote URL from a terminal, then open a support ticket with Atlassian or consult your internal Git administrator.
Limitations and Practical Verification
This guide assumes you are using Sourcetree version 3.x or later and that the remote repository is accessed over HTTPS with a personal access token or password. It does not cover SSH‑based authentication or repository‑level access controls such as branch permissions. After applying any fix, verify success by performing a fetch or pull in Sourcetree and confirming that the operation completes without authentication dialogs and that the remote refs update (visible in the Branches view).
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.