GITHub API file upload error

I am trying to upload a file to GitHub via the GITHub API ( http://developer.github.com/v3/repos/contents/ ). Somehow I can’t upload the file. When I tried to download the existing file, it gave me the message "{\" message \ ": \" refs / heads / master, expected on ee1cd720841a4b5b06a8339c333c56b1748e66f9 \ ", \" documentation_url \ ": \" http://developer.github.com / v3 / repos / contents / \ "}". When I went to github and tried to delete the file using the website, it gave me the error below. I can make a round with a reset head to the previous version and move on. But I'm trying to understand what caused this behavior, and how I can prevent this from happening in the future. Neither Google nor Github Help could answer me so that they were looking for something from the community. Thanks for watching. enter image description here

+7
git github github-api
source share
1 answer

As Ivan suggested, if we try to create / update files using a quick sequence using the API, this causes the mentioned behavior. Until the problem is resolved, we can work around this by creating a thread between the two requests. Hope this helps someone.

+4
source share

All Articles