You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

使用Atlassian SourceTree拉取Gitee项目时认证失败求助

Troubleshooting SourceTree Authentication Failure for Gitee Repository

I’ve run into this exact issue with Gitee and SourceTree before—most of the time it’s tied to credential problems, especially since Gitee has phased out plain account passwords for HTTPS authentication (this is mandatory if you have two-factor authentication enabled). Here are the actionable steps to fix this:

  • Use a Gitee Personal Access Token instead of your account password

    • Go to your Gitee account settings, then navigate to Personal Access Tokens under the "Security" section.
    • Generate a new token with at least the repo permission (this grants access to clone and manage your repositories).
    • When SourceTree prompts for authentication, enter your Gitee username as the "Username" and the generated token as the "Password".
  • Clear outdated saved credentials

    • If SourceTree has stored old or incorrect credentials, it will keep reusing them instead of your new token:
      • On Windows: Open Credential Manager → Go to "Windows Credentials" → Find entries linked to gitee.com or git.oschina.net and delete them.
      • On Mac: Open Keychain Access → Search for gitee.com → Remove any saved passwords/credentials for this domain.
    • Restart SourceTree and try cloning again, entering your username and token when prompted.
  • Double-check the repository URL

    • Confirm the URL you’re using in SourceTree is exactly https://gitee.com/weidu23/EduInfoProj.git—Gitee repository names are case-sensitive, so even a small typo in the username or repo name can cause authentication failures.
  • Test cloning via command line first

    • To rule out SourceTree-specific issues, open your terminal and run:
      git clone https://gitee.com/weidu23/EduInfoProj.git
      
    • When prompted, enter your Gitee username and personal access token. If this works, the problem is definitely with how SourceTree handles credentials, and clearing saved credentials (step 2) should resolve it.
  • Manually input credentials in SourceTree

    • When adding the repository, select the option to "Manually enter credentials" (if available) and input your username and token directly. Make sure the "Store credentials" box is checked so you don’t have to re-enter them repeatedly.

If none of these steps work, double-check that your Gitee account has full access to the repository (since you created it, this should be fine, but it’s worth confirming).

内容的提问来源于stack exchange,提问作者weidu23

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.22 07:35:09