Has anybody managed to successfully create a binary file in a GitHub repository via the GitHub node?
When I try to create the file from Binary Data, I’m getting an error with the message ‘content is not valid Base64’.
When I try to create the file from Base64 (converted the binary via the Move Binary Data node), the file get created, but it’s text rather that the .png file.
Any suggestions on how to get this working is highly appreciated. Thanks in advance!
Hi @dickhoning, thanks so much for reporting this and please accept my apologies for the trouble this causes! I was able to reproduce the problem with the current version of n8n when using the Binary Data option and have added it to our backlog for a fix.
Chances are that when using base64 data your data arriving in GitHub is valid PNG data but that GitHub still considers it a text file as n8n doesn’t provide the right MIME type. I don’t have a great workaround for this at the moment apart from avoiding the n8n GitHub node. Using the HTTP Request node you could create a PNG file in a repository like so:
This works and the file shows up as an actual image when viewed on GitHub’s website:
1 Like
@MutedJam of course no problem, thanks in advance for having this fixed, and thanks for helping me to find a work-around. Unfortunately, I have not been able to get this working yet. Ik keep getting an error 404 …
You might want to change the response type on the HTTP Request node to JSON in order to view the error message from GitHub:

But I think the problem could be a missing /contents/
in your GitHub URL. My request went to https://api.github.com/repos/that-one-tom/n8n-gh-upload/contents/foo.jpg
where that-one-tom
is the owner, n8n-gh-upload
the repository and foo.jpg
is the file path.
So from looking at your screenshot you probably need to use a URL of https://api.github.com/repos/ecxs/budibase/contents/foo.jpg
instead of your current URL.
1 Like
Thanks @MutedJam … now it works 
And can you please keep me posted on when this is fixed in the GitHub node? Or alternatively, let me know how/where I can keep an eye on this?
Thanks again and frohes Sylvester!
1 Like
Sure thing, glad to hear this works! We’ll automatically post in this thread once the bug is fixed (I am sure you’ve seen the posts from @jan that read “Got released with [email protected]
”). I’ll unmark the solution here to prevent the the thread from closing automatically before this happens.
Have een fijn uiteinde as well!