Error when pointing to new repository, Environment variable with the same key name already exists on this site

I’ve got an existing site ( that I’m trying to switch to a new GitHub repo. When I do so, I get:

"msg":"Environment variable with the same key name already 
exists on this site. Try a different key or edit the existing variable.",

I’m not sure what to do. My site uses environment variables of course, but I’m not changing them. The only change I did was to the repo to use for source.

1 Like

So, this may be a false positive. Looking at my build, the change went through, but the error that my build had was NOT reported. So I had a bug, but the Netlify admin here didn’t properly handle the issue.

So it seems the problem is:

If you change your repo -
And the new repo has a build error -
You get the wrong error and it looks like the change didn’t happen, even though it did.

1 Like

Thanks for the writeup, Raymond! I just wrote this bug up earlier today for us; will feed back as things develop!

I forgot to follow up - after I fix my build issues (had a few, all my fault), it worked just fine.

Thanks for coming back and letting us know you solved your solution.