【问题标题】:Cloning URL from DevOps Repository in SourceTree从 SourceTree 中的 DevOps 存储库克隆 URL
【发布时间】:2019-07-30 02:59:19
【问题描述】:

我是 Mac 用户。我想使用源代码树将我的 azure DevOps 存储库克隆到本地。

我所做的是,

  1. 打开 SourceTree
  2. Remote > 在 Azure DevOps 列表中单击我要克隆的存储库的 Clone

我得到了这个窗口。

Source URL

https://ORG_NAME@dev.azure.com/ORG_NAME/PROJECT_NAME/_git/REPOSITORY_NAME

当我点击This is not a valid source path / URL时,它会说,

real URL is https://spsprodea1.vssps.visualstudio.com/_signin?
...abort: 'https://ORG_NAME@dev.azure.com/ORG_NAME/PROJECT_NAME/_git/REPOSITORY_NAME' does not appear to be an hg repository:
---%<--- (text/html; charset=utf-8)


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">




<html lang="en-US">
<head><title>

            Azure DevOps Services | Sign In

</title><meta http-equiv="X-UA-Compatible" content="IE=11;&#32;IE=10;&#32;IE=9;&#32;IE=8" />
    <link rel="SHORTCUT ICON" href="/favicon.ico"/>
...

---%<---
!
fatal: Authentication failed for 'https://ORG_NAME@dev.azure.com/ORG_NAME/PROJECT_NAME/_git/REPOSITORY_NAME' 
fatal: Authentication failed for 'https://ORG_NAME@dev.azure.com/ORG_NAME/PROJECT_NAME/_git/REPOSITORY_NAME' 
fatal: Authentication failed for 'https://ORG_NAME@dev.azure.com/ORG_NAME/PROJECT_NAME/_git/REPOSITORY_NAME' 
fatal: Authentication failed for 'https://ORG_NAME@dev.azure.com/ORG_NAME/PROJECT_NAME/_git/REPOSITORY_NAME' 

我已经使用 usernamePAT 将我的 DevOps 帐户添加到 SourceTree,没有任何问题。

我该如何解决这个问题?

【问题讨论】:

    标签: git azure-devops atlassian-sourcetree


    【解决方案1】:

    检查 SourceTree 是使用其嵌入式 Git 版本还是您自己的“系统”Git。
    SRCTREEWIN-9456SRCTREEWIN-9312 报告了 Git 2.19.1 和 GCM (Git-Credential-Manager-for-Windows) 的问题

    如果您的git config credential.helper 设置为管理器(Windows 凭据管理器),请检查使用latest Git 2.22 Git for Windows release 时问题是否仍然存在。

    【讨论】:

    • 我使用的是 Mac。在这种情况下我该怎么办? git config credential.helper 显示osxkeychain
    • @c-an 同样的问题:检查您使用的是什么版本的 Git,然后检查您是否为 ORGNAME 缓存了凭据。
    • git 版本为git version 2.20.1 (Apple Git-117)。以及如何检查我是否为 ORGNAME 缓存了凭据?
    • @c-an 您可以关注help.github.com/en/articles/… 来检查您是否有一个dev.azure.com 条目,其中包含ORGNAME
    【解决方案2】:

    尝试将 git config credential.helper 更改为 sourcetree 而不是 osxkeychain:

    git config credential.helper sourcetree
    

    【讨论】:

      猜你喜欢
      • 2017-07-28
      • 2020-04-03
      • 2014-01-10
      • 2019-12-26
      • 1970-01-01
      • 2023-03-11
      • 1970-01-01
      • 2013-12-08
      • 1970-01-01
      相关资源
      最近更新 更多