-
-
Notifications
You must be signed in to change notification settings - Fork 10.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Submodule config results in mixed protocols after cloning #10265
Comments
OK that broke travis - trying option 3 Broken build: https://travis-ci.org/TryGhost/Ghost/jobs/466076267
|
FYI this made my heroku push fail. I ended up switching to the HTTPS one and it seems fine now. |
daniellockyer
added a commit
that referenced
this issue
Jul 25, 2022
refs #10265 refs TryGhost/Toolbox#354 - I seem to have regressed the referenced Ghost issue during the conversion to a monorepo - this puts the url paths back to relative URLs so it uses whatever protocol the Ghost repo was cloned with
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We're having some difficulty documenting the best way to setup the Ghost repo & submodules for contributing, as cloning the top-level repo results in a mix of https and ssl URLs in the git config for submodules.
What we want is for there to be a clear and minimal set of commands that result in a correctly setup environment. This environment should be optimised for contributing, not for installing Ghost - which should use the CLI.
The current setup is using https:
Cloning works reliably this way, but when pushing, git checks all remotes and will prompt you for a password, meaning you need to do quite a lot to get all of the remotes setup correctly.
There appear to be 3 potential solutions:
Option 1. Use Git SSH
Option 2. Full relative URLs
Option 3. Urls relative to the TryGhost org
Relative urls means git uses whatever protocol is used on the top level clone for all the submodules.
Using fully relative URLs would open the option to cloning a fork, and automatically having all of the right remotes setup. However, you'd have to have all 3 repos forked to start.
Using URLs relative to the TryGhost org means the top-level protocol is honoured for submodules, and git uses the upstream TryGhost remotes for submodules, meaning you still have to add remotes if you want to work on Ghost-Admin or Casper.
Using git urls means the protocol and remotes are all fixed to use TryGhost with git. This mechanism should be the easiest to reason about, as it should always do the same thing.
Conclusion
For now, I suggest option 1 (git urls) because I think consistency is more important than flexibility, however if we still have problems balancing having a clear path to contributing with weirdness with ports and git not working on certain systems, options 2 and 3 are available to try out as well.
The text was updated successfully, but these errors were encountered: