简体   繁体   English

Visual Studio Team Services代码未与Azure网站同步 - git

[英]Visual Studio Team Services code not syncing with Azure website - git

The code is definitely pushing to Visual Studio Online. 代码肯定是推向Visual Studio Online。 It's there. 在那。 Checking in Kudu, things are being written to the deployment and locks folders, but the code is not syncing with the repository. 检查Kudu时,正在将部件写入部署并锁定文件夹,但代码未与存储库同步。 The locks folder is empty despite the timestamp being updated (not sure if that's significant). 尽管时间戳正在更新,但lock文件夹仍为空(不确定是否有意义)。 In the deployments folder, the "active" file has been updated and contains a value like this: 3c80c6c4bc336c9799549385d8c35ba6b8e4cc45 which is the name of a folder containing info about a previous version of the code. 在deployments文件夹中,“活动”文件已更新并包含如下值:3c80c6c4bc336c9799549385d8c35ba6b8e4cc45这是包含有关以前版本代码的信息的文件夹的名称。 There are a bunch of "temp" folders here too, drilling into the one that represents the latest code push, in the status.xml file: 这里还有一堆“temp”文件夹,在status.xml文件中钻取代表最新代码推送的文件夹:

<deployment>
  <id>temp-1fcaf088</id>
  <author>VSTS</author>
  <deployer>VSTS</deployer>
  <authorEmail>VSTS</authorEmail>
  <message>Synchronizing changes from VSTS ...</message>
  <progress/>
  <status>Failed</status>
  <statusText/>
  <lastSuccessEndTime/>
  <receivedTime>2017-03-01T07:55:13.8296373Z</receivedTime>
  <startTime>2017-03-01T07:55:13.8296373Z</startTime>
  <endTime>2017-03-01T07:55:18.3705755Z</endTime>
  <complete>True</complete>
  <is_temp>True</is_temp>
  <is_readonly>False</is_readonly>
</deployment>

and in the log.log file: 并在log.log文件中:

2017-03-01T07:55:13.9077727Z,Fetching changes.,6d1544dd-5cd5-44b2-a218-93578363eb66,0
2017-03-01T07:55:18.3393557Z,Failed to mmap. No data written: Access is denied.\r\n,,2

Bottom line: The code that I push to my Visual Studio Online repository from Team Explorer has stopped syncing with my Azure website. 结论:我从团队资源管理器推送到我的Visual Studio Online存储库的代码已停止与我的Azure网站同步。 I'm using git. 我正在使用git。 I probably did too many pushes, some were only two or three minutes apart. 我可能做了太多的推,有些只相隔两三分钟。 (I know, I know, but I had good reason to. I was trying different Web.config values that only applied to the live site.) How can I get my code to sync again? (我知道,我知道,但我有充分的理由。我正在尝试不同的Web.config值,这些值仅适用于实际网站。)如何让我的代码再次进行同步?

I went into the root site structure "/" in the Debug Console in Kudu and tried to delete all the top-level folders. 我在Kudu的调试控制台中进入了根站点结构“/”,并尝试删除所有顶级文件夹。 Some things you're not allowed to delete, and you'll get an error message. 有些事情你不允许删除,你会收到一条错误信息。

Obviously, please be careful when doing this! 显然,这样做时请小心! After trying to delete these folders I did a push and the site is now updated and everything is fine. 尝试删除这些文件夹后,我做了一个推,现在网站已更新,一切都很好。

I haven't tested this but it may be the case that you only need to delete one root folder, eg the .nuget folder, so you should probably try this first. 我没有测试过这个但是你可能只需删除一个根文件夹,例如.nuget文件夹,所以你应该先试试这个。 You can always delete the rest if it doesn't work. 如果不起作用,您可以随时删除其余部分。

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

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