-
Notifications
You must be signed in to change notification settings - Fork 152
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
https urls in .gitmodules instead of ssh #105
Comments
Yes, I think you're right that this could reduce the variations for cloning. We originally set things up with the git url (ssh transfer protocol) because it allows developers to avoid entering their password for every fetch/pull/push by using ssh-agent (we were then, and probably still are, biased towards the developer's view of things). I'm not aware of a way to avoid repeatedly entering passwords when pushing using the https protocol (at least not a way that our security people would permit). My two cents: applying for a GitHub account is a minor burden and for those not wanting to create a GitHub account then the extra setup commands needed are a one-time requirement. However, we will look at this again. |
The ssh protocol continues to work with https urls in .gitmodules. Git is able to parse https urls in ssh format but not the other way around. I have tested this. Can someone else confirm this? Also, gtools, midas, atmos_null, land_null, mkmf and cv-mix are already in https form. So this change would come at no additional cost to ssh users. I'm sorry, I should have made it clear in the original message. |
The https URLs (mkmf, atmos_null, MIDAS, ...) are for repositories that MOM6 developers do not all have write access to - hence the mix of URLs in .gitmodules. I've been trying this out. As far as I can tell, there is no equivalent of "pushUrl" for submodules. The push and pull urls are the same unless you intervene by changing the remote push url after cloning. I am not seeing a way to use https for pulling and ssh for pushing without a whole load of post-clone configuration. How did you get to the point of "ssh protocol continues to work with https urls in .gitmodules" because it doesn't for me? |
Ooops. My bad. Does not work for me either.
I just changed the urls in .gitmodules from ssh to https format and forgot to issue a Another possible solution is to use relative paths in .gitmodules. With relative paths the protocol used in initial cloning is used for subsequent push and pull commands (http://blog.tremily.us/posts/Relative_submodules/). This would carry all the benefits discussed earlier in this thread. However, this would present a problem if someone only wants to fork, say, MOM6-examples because .gitmodules would point to non-existent repos. In such a case we'd need more instructions in the About Github forks section to redirect the relative paths in .gitmodules to NOAA-GFDL. |
This issue has been stewing at the back of my mind. I have come to the conclusion that we should change the .gitmodules to use https and then have developers change the remote for "origin" to use ssh when they set up their work space.
With the current use of ssh in .gitmodules, it only makes life easier for the privileged devs on rare clones at the expense of complexity for everyone else. |
…-05' into dev/master - Merge from dev/ncar onto dev/master updates MOM_parameter_doc files. - NOAA-GFDL/MOM6@1328636 Merge branch 'gustavo-marques-dev-master-candidate-ncar-2019-08-05' into dev/master - NOAA-GFDL/MOM6@35b5c76 Merge pull request #115 from gustavo-marques/update_meke - NOAA-GFDL/MOM6@c149c20 Merge pull request #114 from gustavo-marques/update_mom_vert_friction - NOAA-GFDL/MOM6@815db63 Change default way to computing FrictWork in MEKE - NOAA-GFDL/MOM6@68ec55e Merge pull request #113 from gustavo-marques/rename_modules - NOAA-GFDL/MOM6@c56450a Deletes all code related to Jansen15_drag - NOAA-GFDL/MOM6@21fd427 Make sure that MEKE%GME_snk is only used when the array is allocated - NOAA-GFDL/MOM6@d292a57 Deletes contribution from kv%slow when computing a_cpl - NOAA-GFDL/MOM6@a34bdf4 Capitalize MOM inside MCT modules - NOAA-GFDL/MOM6@fc55c36 Rename modules for NUOPC - NOAA-GFDL/MOM6@8a04b99 Rename modules for MCT - NOAA-GFDL/MOM6@3b2ad3f Rename modules in NUOPC - NOAA-GFDL/MOM6@1305e73 Rename modules in MCT - NOAA-GFDL/MOM6@06a7c46 Merge pull request #112 from gustavo-marques/mct_nuopc_validation - NOAA-GFDL/MOM6@562297c more changes to have minimal differences between nuopc and mct - NOAA-GFDL/MOM6@f72454b changes to have minimal differences between nuopc and mct - NOAA-GFDL/MOM6@3135f62 removed trailing whitespace - NOAA-GFDL/MOM6@7c90fa0 changes to get MOM_ocean_model.F90 closer to nuopc_driver - NOAA-GFDL/MOM6@c4e349d Merge branch 'dev/ncar' into mvertens/validation_fixes2 - NOAA-GFDL/MOM6@3995037 more updates to have caps consistent with dev/ncar - NOAA-GFDL/MOM6@8da9eb9 changes to the interfaces to bring them more in line with dev/ncar latest - NOAA-GFDL/MOM6@b9844d7 Merge pull request #108 from gustavo-marques/merge-dev-master-candidate-2019-07-08 - NOAA-GFDL/MOM6@f5899da Merge branch 'dev/master' into merge-dev-master-candidate-2019-07-08 - NOAA-GFDL/MOM6@2a65e65 Merge pull request #107 from NCAR/mvertens/validation_fixes - NOAA-GFDL/MOM6@05709a1 Merge pull request #104 from gustavo-marques/remove_salt_flux_from_net_FW - NOAA-GFDL/MOM6@3fcd942 Deletes comments - NOAA-GFDL/MOM6@87e6f17 removed trailing whitespace - NOAA-GFDL/MOM6@6ec503f Merge branch 'dev/ncar' into mvertens/validation_fixes - NOAA-GFDL/MOM6@cac0656 fixes to get taux and tauy roundoff between mct and nuopc - NOAA-GFDL/MOM6@f8758ec Merge pull request #106 from gustavo-marques/bobs_solution - NOAA-GFDL/MOM6@3f8c425 Merge pull request #105 from NCAR/mvertens/mom6_validation - NOAA-GFDL/MOM6@3f7e9f6 changes needed for mom6 validation - NOAA-GFDL/MOM6@97c2395 Commenting out salt_flux adjustment in net_FW in NUOPC cap - NOAA-GFDL/MOM6@9d8468a Commenting salt_flux adjustment in net_FW
Updated the version of MOM6 that MOM6-examples points to, and updated the available_diags files to reflect the changes in MOM6. Also updated other MOM_parameter_doc files in infrequently run test cases that previous changes had altered but which were not updated when the corresponding code changes were introduced. All answers are bitwise identical. The MOM6 commits that are included in this update are: - NOAA-GFDL/MOM6@684878ee4 Add a deta_dt diagnostic to the split BT/BC mode (#99) - NOAA-GFDL/MOM6@b4b7368d5 Merge pull request #111 from marshallward/field_size_fixes - NOAA-GFDL/MOM6@54b8ff50b Merge branch 'dev/gfdl' into field_size_fixes - NOAA-GFDL/MOM6@f6fc6ce17 FMS2: get_field_sizes with FMS1 emulation - NOAA-GFDL/MOM6@f54338ad1 Fix non-standard white space (#109) - NOAA-GFDL/MOM6@d729c679a +Remove append_substring - NOAA-GFDL/MOM6@d8bc9639e Removal of non-standard extensions - NOAA-GFDL/MOM6@7a147ad41 +Document or eliminate undocumented interfaces - NOAA-GFDL/MOM6@e9fdf5de3 Standardized syntax in mask2d logical tests - NOAA-GFDL/MOM6@7f6dac283 Merge pull request #105 from marshallward/pedantic - NOAA-GFDL/MOM6@d3d0c8ecc Merge branch 'dev/gfdl' into pedantic - NOAA-GFDL/MOM6@c150f37a1 Correct --with-driver args for coupled tests (#106) - NOAA-GFDL/MOM6@6809ee3a4 Fix tides_CS attribute in unsplit mode (#103) - NOAA-GFDL/MOM6@d2fb2d0ed MOM_random: Set mask with bits rather than integer - NOAA-GFDL/MOM6@a5350219b Mixed layer restrat statement function refactor - NOAA-GFDL/MOM6@936b11fb6 Format string fixes; function index reorder
If someone does not have git setup to use SSH, this does not work because it encounters ssh urls in .gitmodules. If all ssh urls are replaced by https ones, the above command works. We can then do away with the Cloning-without-a-GitHub-account page and just replace it with the above command.
Edit: fixed link
The text was updated successfully, but these errors were encountered: