英文:
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.
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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论