Showing results for 
Search instead for 
Did you mean: 
Copilot Lvl 2
Message 1 of 2

Updating through API returns 404


I am trying to update a file in a repository using the GitHub API and the PyGitHub client. I have written a Python script to do so, and when I run it locally, everything works great.


When I run the same script on my server, I get a 404 error when I try and make the update. I know that 404s are usually returned when a client is not authenticated, but I'm able to create a branch before I get the update error. I'm really not sure how to go about debugging this, usually I would inspect the requests the client was sending with `tcpdump` but since they're sent over HTTPS this is not possible. Any ideas where I should look next?

1 Reply
Community Manager
Message 2 of 2

Re: Updating through API returns 404

Can you give a step-by-step of:


  1. What it is your script is doing
  2. What you expect to happen
  3. What is actually happening instead


The behavior you describe could be a lot of things. Also, is the server authenticating in the exact same way as when you run it locally? Even using the exact same user account or credentials?