0%

Red Exclamation Mark on Remote Icon In Sourcetree

这个问题困惑我很久了。本地的Git Repo, 使用Sourcetree打开后,Remote图标上总有一个红色感叹号。鼠标移动上去,也没有任何错误提示。

Sourcetree

最近花了点时间终于解决了。

问题的原因在于Git Repo没有指定Remote Account。

Sourcetree

解决步骤

  1. 首先确定你的远程Git Repo是由以下的Hosting Provider来提供,如果不是,那么本文的解决方案则不适用。
    Sourcetree

  2. 打开Sourcetree的Options对话框,点击 Authentication -> Add。
    Sourcetree

  3. 选择你的Hosting Service,输入相关的身份验证信息。我使用的是Azure DevOps,需要提供PAT来验证身份信息。
    Sourcetree

  4. 打开Git Repo的Settings对话框,编辑默认的远程Repo(一般是origin)。将Remote Account设置为刚才创建的Azure DevOps账号。
    Sourcetree

  5. 关闭Sourcetree重新打开,Remote图标上的红色感叹号就消失了。