I currently host my site on Bitbucket and it is locked to only whitelisted IP addresses. When i try to deploy from Netlify, the build fails as Netlify IP is not whitelisted in my Bitbucket account. I get the following messages:
4:37:02 PM: Starting to prepare the repo for build
4:37:07 PM: git ref refs/heads/master does not exist or you do not have permission
4:37:07 PM: Failing build: Failed to prepare repo
4:37:07 PM: failed during stage ‘preparing repo’: git ref refs/heads/master does not exist
The deploy works fine if disable IP whitelisting in my Bitbucket account. So, i am wondering what IP addresses i should whitelist in Bitbucket for deploys to work in Netlify. Any help would be much appreciated. Thanks!
Our build environment and our serving environment change frequently and there is no fixed netblock or addresses. You cannot use us directly to pull code from your repo if you cannot allow ALL access via SSH. I’d suggest a different deployment method in that case:
I have added your voice to the feature request we have to create the ability to use a limited range of IP’s to contact your git host, but I do not have any commitment to implement it yet so this is mostly useful to you in knowing that we will inform you in case the situation changes.
@fool My use case is different but I still need a range of Netlify’s IPs. My Netlify web app calls a back-end server (elsewhere, not on Netlify). For security concerns, this back-end server only allow calls from a whitelist of known callers. So, I need to have the back-end server whitelist calls from my app on Netlify. Thus, I need a range of Netlify’s IPs to do that. The back-end server cannot just permit all IPs to make a call to it–that would be a huge and unacceptable security risk. Please consider this an urgent and important need. Thank you.
I’m trying to explore the JWS option. I’m reviewing the Netlify docs on signed proxy redirects that you mentioned and maybe I’m missing something here.
Question 1: The signed JSON document contains a field called context. How do I control what goes into context? I would need this data to be generated dynamically on-the-fly since the context would have to change on a per-request basis.
Question 2: netlify.toml “signed” directive. Does it have to be under a [[redirects]]? (I don’t need a redirect here, do I?)
@fool Where does the JWS data come in? I’ve added signed to a redirects in my netlify toml and created an environment variable
I dumped the proxied request Netlify is making and see a bunch of X-headers but no JWS to validate. There is also the JWT token set as a cookie as nf_jwt, but that came in before I enabled JWS and I can’t validate it with my SECRET_KEY environment variable or hash specified in the JWS doc.
You need to first click login and register an account. Then go to the protected tab which will make a fetch request against the proxy url. The proxy is set to a debug server URL which isn’t running right now.
from = "/couchdb/*"
to = "http://22.214.171.124:8000/:splat"
status = 200
force = true
signed = "SECRET_KEY"```
No change that I am aware of. We’ve held off making any changes due to the holidays. Glad it’s working for you now but do let us know if something changes again so we can continue looking into the issue. Thanks for your patience.
Could you please link us to the deploy in question? Starting to sound like there is some complicating factor like a split test without that config deployed and I’d like to look at the specific deploy in our system to see if I can see anything.