简体   繁体   English

Azure DevOps – 到 Intranet TFS 2018 的管道:SSL_ERROR_SYSCALL

[英]Azure DevOps – Pipelines to intranet TFS 2018: SSL_ERROR_SYSCALL

I am setting up Azure Pipelines, I have few that get sources from GitHub and trying to setup pipelines to reach TFS on intranet for some time.我正在设置 Azure Pipelines,我几乎没有从 GitHub 获取资源并尝试设置管道以到达 Intranet 上的 TFS 一段时间。

I started anew, I created a new PAT token in TFS with full access.我重新开始,我在 TFS 中创建了一个具有完全访问权限的新 PAT 令牌。 I created a new Service Connection of type: “Azure Repos/Team Foundation Server” using this URL: https://tfs.myCie.com/defaultcollection/MyProject and the PAT token from TFS above.我使用以下 URL 创建了一个新的服务连接类型:“Azure Repos/Team Foundation Server”: https : //tfs.myCie.com/defaultcollection/MyProject和上面来自 TFS 的 PAT 令牌。

I created a new pipeline, selecting Other Git and using the new service connection.我创建了一个新管道,选择其他 Git 并使用新的服务连接。 I didn't know what to use as default branch as I don't see any branches on TFS so I used master.我不知道使用什么作为默认分支,因为我在 TFS 上没有看到任何分支,所以我使用了 master。

I used the empty job option and entered again the service connection name and the master branch.我使用了空作业选项并再次输入了服务连接名称和主分支。 When I tried to select the YAML template, it wasn't able to save it to a repo, should I have a different repo for Yaml files to TFS?当我尝试选择 YAML 模板时,它无法将其保存到存储库中,我是否应该将 Yaml 文件的不同存储库设置为 TFS?

I paid attention that my .proxy file was filled and the .proxybypass file had the TFS server URL.我注意到我的 .proxy 文件已填满,并且 .proxybypass 文件具有 TFS 服务器 URL。

When I run the pipeline, early on the UI gives a timeout but after 6-7 minutes, I have logs that says:当我运行管道时,UI 的早期会超时,但在 6-7 分钟后,我的日志显示:

Syncing repository: repository (ExternalGit) ##[debug]repository url=https://tfs.myCie.com/defaultcollection/myProject/ ##[debug]targetPath=D:\\Agent_work\\19\\s git version 2.26.2.windows.1 git remote add origin https://tfs.myCie.com/defaultcollection/myProject/ ##[debug]Finished process 6888 with exit code 0.同步存储库:存储库(ExternalGit)##[debug]repository url=https://tfs.myCie.com/defaultcollection/myProject/##[debug]targetPath=D:\\Agent_work\\19\\s git version 2.26.2。 windows.1 git remote add origin https://tfs.myCie.com/defaultcollection/myProject/ ##[debug]已完成进程 6888,退出代码为 0。

git config --get-all http.https://tfs. git config --get-all http.https://tfs。 myCie.com/defaultcollection/myProject/.extraheader If I test this .ExtraHeader URL, it either doesn't exist or I don't have access ! myCie.com/defaultcollection/myProject/.extraheader 如果我测试这个 .ExtraHeader URL,它要么不存在,要么我没有访问权限!

git config --get-all http.proxy git remote set-url origin https://emptyusername:***@tfs. git config --get-all http.proxy git remote set-url origin https://emptyusername:***@tfs. myCie.com/defaultcollection/myProject/ fatal: unable to access 'https://tfs.myCie.com/defaultcollection/myProject/': OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to tfs.oecd.org:443 myCie.com/defaultcollection/myProject/ 致命:无法访问“https://tfs.myCie.com/defaultcollection/myProject/”:OpenSSL SSL_connect:连接到 tfs.oecd.org 的 SSL_ERROR_SYSCALL:443

Can it be a proxy error or a user access account ?可能是代理错误还是用户访问帐户?
In the later case, what access rights would I need ?在后一种情况下,我需要什么访问权限?
What settings I should use when creating the PAT token in TFS ?在 TFS 中创建 PAT 令牌时应该使用哪些设置? Thanks.谢谢。

I am afraid you were using the wrong serve connection type.恐怕您使用了错误的服务连接类型。

Azure Repos/Team Foundation Server service connection is used in the repositories resources section in the yaml pipeline, which you can refer to the repositories in other organizations using a service connection. Azure Repos/Team Foundation Server服务连接用于 yaml 管道中的存储库资源部分,您可以使用服务连接引用其他组织中的存储库。 See this document for more informaiton.有关更多信息,请参阅此文档

resources:
  repositories:
  - repository: otherrepo
    name: ProjectName/RepoName
    endpoint: newTFSServiceConnection
steps:
- checkout: self
- checkout: otherrepo

If you want to set up a pipeline for a repos in another TFS server.如果要为另一个 TFS 服务器中的存储库设置管道。 You need to create a new Service Connection of type Other Git您需要创建一个新的其他 Git类型的服务连接

在此处输入图片说明

And enter the tfs repo url and users name / password in the edit page.并在编辑页面中输入tfs repo url和用户名/密码。

在此处输入图片说明

Then you can select this Other git type Service connection when creating a pipeline.然后就可以在创建管道的时候选择这个Other git type Service connection。

If you cannot connect to your tfs repo via PAT.如果您无法通过 PAT 连接到您的 tfs 存储库。 It might be because the IIS Basic Authentication is enabled on your windows machine, it prevents you from using personal access tokens (PATs) as an authentication mechanism.这可能是因为在您的 Windows 计算机上启用了 IIS 基本身份验证,它阻止您使用个人访问令牌 (PAT) 作为身份验证机制。 See here , You can try using basic anthentication method (username and password) instead这里,您可以尝试使用基本的身份验证方法(用户名和密码)代替

Please be noted that you need to run this pipeline on your self-hosted agent.请注意,您需要在自托管代理上运行此管道。 As you are trying to connect to the repo on your tfs intranet server.当您尝试连接到 tfs 内联网服务器上的存储库时。 Cloud Microsoft hosted agent cannot connect to your intranet tfs server.云 Microsoft 托管代理无法连接到您的内网 tfs 服务器。 Unless it is can be accessed in the public network.除非是可以在公网访问的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM