On premise TFS Git OAuth clone failed on agent

利用TFS2015的跨平台生成代理,在mac osx 上生成xamarin.ios项目,agent费劲九牛二虎之力搞定了(参见http://www.cnblogs.com/zjoch/p/5811017.html),发起生成任务却死活无法获取源码版本,

错误如下:

复制代码
2016-09-02T08:13:24.186Z: preparing Workspace
 
2016-09-02T08:13:24.187Z: cwd: /Users/owner/myagent/_work
 
2016-09-02T08:13:24.188Z: Repository type: TfsGit
 
2016-09-02T08:13:24.188Z: using source provider: tfsgit
 
2016-09-02T08:13:24.188Z: loading: /Users/owner/myagent/agent/scm/tfsgit
 
2016-09-02T08:13:24.194Z: Using auth scheme: OAuth
 
2016-09-02T08:13:24.199Z: running incremental
 
2016-09-02T08:13:24.199Z: getting code
 
2016-09-02T08:13:24.200Z: http://tfs2013-tfs:8080/tfs/DefaultCollection/_git/GitMobileApps
 
2016-09-02T08:13:24.200Z: srcVersion: 4d93b485cfef047e3418760345bc953139a0230e
 
2016-09-02T08:13:24.200Z: srcBranch: refs/heads/master
 
2016-09-02T08:13:24.200Z: Using ref: 4d93b485cfef047e3418760345bc953139a0230e
 
2016-09-02T08:13:24.208Z: Cloning into 's'...
 
2016-09-02T08:13:24.209Z: 
 
2016-09-02T08:13:24.242Z: fatal: Authentication failed for 'http://OAuth:********@tfs2013-tfs:8080/tfs/DefaultCollection/_git/GitMobileApps/'
 
2016-09-02T08:13:24.242Z: 
 
##[Error] 2016-09-02T08:13:24.247Z: /usr/bin/git failed with return code: 128
复制代码

经过bing搜索,找到了下面的老外的解决办法:

try setting envvar(解决办法,在tfs的生成定义中,添加这2个变量,并填写正确的账号密码,如:esp\tfscompile域账号)

VSO_GIT_USERNAME
VSO_GIT_PASSWORD

https://github.com/Microsoft/vso-agent/blob/master/src/agent/scm/tfsgit.ts

原文:https://github.com/Microsoft/vso-agent/issues/68 感谢他们!

 

posted @   遥望星空  阅读(519)  评论(0编辑  收藏  举报
编辑推荐:
· AI与.NET技术实操系列:基于图像分类模型对图像进行分类
· go语言实现终端里的倒计时
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
阅读排行:
· 分享一个免费、快速、无限量使用的满血 DeepSeek R1 模型,支持深度思考和联网搜索!
· 基于 Docker 搭建 FRP 内网穿透开源项目(很简单哒)
· 25岁的心里话
· ollama系列01:轻松3步本地部署deepseek,普通电脑可用
· 按钮权限的设计及实现
历史上的今天:
2015-09-02 深入System.Web.Caching命名空间 教你Hold住缓存管理
点击右上角即可分享
微信分享提示