Answer the question
In order to leave comments, you need to log in
How to upload a file to a github repository using the Github REST API?
Hi everybody!
How to upload a file to a github repository using the Github REST API?
I look at the docks, everywhere how to create, how to update is, but how to make an upload is nowhere to be found.
Can anyone tell me how to download? Are there any examples? CURL/PHP
Thank you
Answer the question
In order to leave comments, you need to log in
Decision:
curl -i -X PUT -H 'Authorization: token xxxxxxxxxxxxxxxxxxxxxxxxxxx' -d
'{"message": "uploading file",
"content": base64_encode(FILE)
}' https://api.github.com/repos/{USER}/{REPO}/contents/file.ext
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question