I am trying to upload file to GitHub via GITHub API (http://developer.github.com/v3/repos/contents/ http://developer.github.com/v3/repos/contents/). Somehow I am not able to upload file. When I tried to upload existing file it gave me message "{\"message\":\"refs/heads/master expected to be at ee1cd720841a4b5b06a8339c333c56b1748e66f9\",\"documentation_url\":\"http://developer.github.com/v3/repos/contents/ http://developer.github.com/v3/repos/contents/\"}". When I went to github and tried to delete file using website it gave me below error. I can do workaround with reset head to previous version and move on. But I am trying to understand what caused this behavior and how can I prevent same in future. Neither Google nor Github Help was able to answer me so looking for something from community. Thanks for looking into it.
正如 Ivan 所建议的,如果我们尝试使用 API 快速连续地创建/更新文件,则会导致上述行为。在问题得到解决之前,我们可以通过让线程在两个请求之间休眠来解决此问题。我希望它能帮助某人。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)