Azure DevOps Pipeline拉取远程服务器更改。

huangapple go评论59阅读模式
英文:

Azure DevOps Pipeline Pull Remote Server Changes

问题

我的自托管构建服务器E盘上有一些需要与Azure仓库同步的源文件。我成功地使用Git Pull命令更新了远程服务器,但无法从构建服务器源文件推送更改到Azure仓库。我看到一个消息头处于分离状态,但如果我登录到服务器并运行git status,我可以看到有文件需要推送。

我的问题是,是否可以通过管道从构建服务器推送更改到Azure仓库?

谢谢。

英文:

My Self Hosted Build Server E drive has some source files which which needs syncing with azure repos. I am managed to update the remote servers with Git Pull command however i am not able to push changes to azure repos from build server source files. I see a message head is deatcahed however if i log on to server and run git status i can see there are files to be pushed.

My question is it possible through pipeline that to push changes from build server to AzureRepos ?

Thanks

答案1

得分: 0

我已经按照这份文档的指导完成了上述操作。

链接:https://learn.microsoft.com/en-us/azure/devops/pipelines/scripts/git-commands?view=azure-devops&tabs=yaml

我在仓库中创建了一个批处理文件,其中包含一系列的指令。

为管道授予权限。

在自托管代理上执行。

成功实现了结果,即从服务器拉取最新代码并将更改推送到仓库。

英文:

I have followed this documentation which helped me achieve above.

https://learn.microsoft.com/en-us/azure/devops/pipelines/scripts/git-commands?view=azure-devops&tabs=yaml

I created bat file in the repository with set of instructions

Given permission to pipeline

Executed on a self-hosted agent

Able to achieve the results i:e pull latest code from the server and push the changes to repository.

huangapple
  • 本文由 发表于 2023年3月4日 02:48:44
  • 转载请务必保留本文链接:https://go.coder-hub.com/75630825.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定