linux - 如何在 TFS 服务器的 linux 代理中运行 shell 脚本

标签 linux git tfs agent

我无法理解以下这些错误,有人可以指出为什么我在尝试运行 github 中的 shell 脚本时会收到这些错误:pathspec 'refs/remotes/origin/master' 不匹配git Git checkout 已知的任何文件失败,退出代码:1

******************************************************************************
Starting: Build
******************************************************************************


Current agent version: '2.105.7'
******************************************************************************


Starting: Get Sources
******************************************************************************


Syncing repository: Job (TfsGit)


git version

git config --get remote.origin.url

git config gc.auto 0

git config --get-all

http.http://54.183.83.168:8080/tfs/DefaultCollection/_git/Job.extraheader

git config --get-all http.proxy

git -c http.extraheader="AUTHORIZATION: bearer ********" fetch --tags --prune --progress origin

git checkout --progress --force refs/remotes/origin/master

error: pathspec 'refs/remotes/origin/master' did not match any file(s) known to git

Git checkout failed with exit code: 1


******************************************************************************
Finishing: Get Sources
*****************************************************************************

*

*****************************************************************************

*

Starting: Post Job Cleanup
******************************************************************************

Cleaning any cached credential from repository: Job (Git)

git remote set-url origin 

http://54.183.83.168:8080/tfs/DefaultCollection/_git/Job

git remote set-url --push origin 

http://54.183.83.168:8080/tfs/DefaultCollection/_git/Job
******************************************************************************
Finishing: Post Job Cleanup
******************************************************************************
******************************************************************************
Finishing: Build
******************************************************************************

最佳答案

我认为您正在尝试克隆一个空的 git 存储库。

我有同样的错误: enter image description here

初始化您的存储库或选择另一个 enter image description here

你会得到你的文件。 enter image description here

关于linux - 如何在 TFS 服务器的 linux 代理中运行 shell 脚本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54734056/

相关文章:

visual-studio - 快捷方式/链接到 TFS 中的另一个文件夹

git - 将历史添加到 git 存储库或 merge git 存储库

tfs - 构建计数器 - Visual Studio 团队服务

linux - apache mod_rewrite mod_proxy 子域到目录

Linux内核结构文件指针

git - Jenkins:使用来自另一个 repo 的 jenkinsfile 构建多分支管道

git - 当本地主分支上没有工作时, git pull --rebase 是否与 git pull 相同?

TFS 构建解决方案失败 : UnauthorizedAccess Microsoft. PowerShell.Commands.ImportModuleCommand

linux - 如何使用 AWK 来唯一化一个表(为每个唯一 ID 保留最大值)?

linux - 在运行的应用程序中查找内存位置