netlify/next-on-netlify

Add clarification for deployment with submodules

ctjlewis opened this issue · 4 comments

Describe the bug

"Bug report" is a bit of a misnomer, but the behavior is technically unexpected. For the most seamless usage of Next on Netlify, something that deploys on Vercel out-of-the-box should ideally work on Netlify as well after following the README instructions.

This Next site contains a private submodule, and despite adding a deploy key to the submodule repo as advised here, the deploy fails with could not read Username for 'https://github.com': No such device or address unless (according to that thread) the git remote is SSH format.

It might be a good idea to add a note to the README about Deploy Keys and clarify that private repos will need to be configured with SSH remotes (e.g. git@github.com:owner/project.git) in order to deploy properly.

Does anyone have any thoughts? I would be happy to send in a PR to add this section to the README after reviewing some feedback.

To Reproduce

Steps to reproduce:

  1. Deploy site with HTTPS remote submodule in it
  2. Get error

Versions

  • Next: latest
  • next-on-netlify: latest

hey @ctjlewis! thanks so much for opening this issue and the accompanying PR!! this is an interesting use case i personally haven't encountered before but a very valid and not uncommon one, of course. there are a few things that come to mind. with the Next on Netlify initiative here at netlify, we will eventually be moving away from this repo. i think it doesn't hurt at all to merge your PR (thanks for the accessibility changes as well!!) with the submodule details; that said, i think it may/will be more appropriate in netlify's docs whenever we get to a point of having a thorough breakdown of the framework in our docs (vs scattered between here and the plugin repo and stuff). that's just me kindof sharing my line of thinking; doesn't really change things for you :). it'll just be on me to make sure this bit gets transferred over to wherever we'll be housing all the next stuff in our docs. lmk if you have any other thoughts! and feel free to tag me in the PR when it's no longer a draft!

I had the same thoughts - this isn't really a Next on Netlify thing, it's really a Deploy footnote in general.

Ideally, like you said, that note would go in the Deploy docs, and there would just be a tiny footnote in the section we have now like "please see this note regarding private submodules," which is much less intrusive on existing docs as well.

I just sent PRs in for all the bumps I hit trying to get netlify dev to work, and this was the final thing that caused the CLI to throw! Not trying to spam pointless changes, hope it's not a bother.

totally with you! is your PR still a draft or is it ready to be reviewed/merged? :D @ctjlewis

It's probably good to review/merge @lindsaylevine! I will update.