A bug with new GitHub site: ampersand in a branch name

When trying to add a new Netlify site, I could choose my GitHub organization and correctly see the repositories. When I selected a repository, I got an error which included this message: “This could be because the repository is empty or disabled”

Using Chrome dev tools, I saw that the Netlify site creation page was making a call to GitHub which resulted in 404.

This issue is that a recent branch had an ampersand “&” in the branch name, and Netlify was passing this as the value for the “ref” URL query parameter without escaping. Example:


I simply deleted that branch from GitHub and all is ok. Just wanted to bring this to light.

@MillerGregor! Great find - this is a new bug we haven’t heard of before. Thank you so much for bringing this up to us and describing it so well. I’ve filed an issue and we’ll report back when we have had a chance to fix it.

many thanks!