New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SHA not supplied while creating new file #1725
Comments
@pizycki I think this might be related to the branch name - it looks like you're creating it from the current time, and if that doesn't exist the repository wouldn't know where to create the new commit from. What if you used a fixed branch name to confirm that the |
I create branch with that name just before attempting to create new file. You can check my program right here https://github.com/pizycki/DevoWeek/blob/octokit/DevoWeek/Program.fs#L39 Edit: I found a bug in my code. I was trying to create a file that already exists on base branch. The file creation works fine :) Thanks for your reply and for Octokit, its great :) |
@pizycki I'm glad you were able to get to the bottom of it! |
I was searching for the same, got below solution. |
I'm trying to create file with Octokit.NET inside my repository
but receiving the following error
I checked with Fiddler the request sent to API and this is how it looks like
I checked this with API Documentation and what is happening, according to docu, is ok (yet odd). Looks like API awaits for SHA parameter to update the file, not create a new one.
I'd expect the file creation to use
POST
instead ofPUT
.I've tried changing it in .NET code, but using
POST
method gives me404
.The text was updated successfully, but these errors were encountered: