Building from github repo as collaborator

Firstly, love netlify - thanks for making such a great service.

I’ve used netlify on a few projects now where I have been the github repo owner. I’m having a problem accessing a repo where the github account is a collaborator, not the owner.

In a nutshell, I’m trying to add a site for my client under their netlify login so that they have access to the netlify contact form submissions. However, their github account is setup as a collaborator to the repo (my own github account, curious-toad, is the owner). As such, when I go to add the repo in netlify to build the site, it can’t find it.

To use netlify builds, does the user need to own the repo? Or is there a trick to be able to use collaborator access?

Cheers

Rob

1 Like

Howdy Rob & welcome to our Community!

You need administrative permissions on the repo (and potentially on its owning account), since the automatic linking puts a webhook and deploy key in place, which only admins can do; our UI will (try to) only show you repos that you have such permissions on.

Fear not, you can link (with the admin’s help) using our CLI, manually:

Hey there, sorry for the slow reply - the email notification went into my spam folder!

Thanks so much for following up, really appreciate it. That totally makes sense that it needs admin level - will do that approach next time.

I actually resolved this by switching the repo to be an organisation repo and then added myself and the client as collaborators (which will work for other setups too).

Thanks again.

great! thanks for sharing your solution, that helps other people for sure! That’s basically what I would have suggested as well.

Hi, it seems that the solution does not work without a fee anymore:
a) netlify requires a paid account to connect to a github organization’s repository (if private)
b) private github repositories only provide “collaborator” access, no admin
I assume that is the current policy to force paid accounts for private collaborations? Or is there any other way?
Thanks

Hi, @perrette. You are correct that the solution above no longer works.

Please note, we only charge for Git contributors if they are triggering successful builds at Netlify. So, if the other Git contributor doesn’t need to trigger builds at Netlify, you can use a build.ignore to block any builds triggered by their commits.

This would prevent you for being charge for them as all their builds will be cancelled and they will never trigger successful builds. You are also not charged for any build minutes for cancelled builds so they wouldn’t cause charges for build minutes either.

If there are questions or if you would like an example of a build.ignore` command that filters by committer, please let us know.