-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updating submodules to use HTTP instead of SSH, (#73)
- Loading branch information
1 parent
114a9fc
commit c100517
Showing
3 changed files
with
39 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
[submodule "website/themes/uswds"] | ||
path = website/themes/uswds | ||
url = git@github.com:usnistgov/hugo-uswds.git | ||
url = https://github.com/usnistgov/hugo-uswds.git | ||
branch = master | ||
update = rebase | ||
[submodule "support/schematron"] | ||
path = support/schematron | ||
url = git@github.com:usnistgov/schematron.git | ||
url = https://github.com/usnistgov/schematron.git | ||
branch = master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -91,3 +91,39 @@ This project is in the public domain within the United States, and copyright and | |
## Contributions will be released into the public domain | ||
|
||
All contributions to this project will be released under the CC0 dedication. By submitting a pull request, you are agreeing to comply with this waiver of copyright interest. | ||
|
||
## Git Client Setup | ||
|
||
### Initializing Git submodules | ||
|
||
This GitHub repository makes use of Git submodules to mount other repositories as subdirectories. | ||
|
||
When cloning this repo for the first time, you need to initialize the submodules that this repository depends on. To do this you must execute the following command: | ||
|
||
``` | ||
git submodule update --init | ||
``` | ||
|
||
You can perform the clone and submodule initialization in a single step by using the following command: | ||
|
||
``` | ||
git clone --recurse-submodules https://github.com/usnistgov/metaschema.git | ||
``` | ||
|
||
### Configuring Submodules to Use SSH | ||
|
||
Some clients will make use of Git over SSH with a private SSH key for GitHub projects. For convenience, the submodules are configured to use HTTP instead of SSH. To override this default behavior, you will need to configure your Git client to use SSH instead of HTTP using the following command: | ||
|
||
``` | ||
git config --global url."[email protected]:".insteadOf https://github.com/ | ||
``` | ||
|
||
This instructs your Git client to dynamically replace the HTTP-based URLs with the proper SSH URL when using GitHub. | ||
|
||
### Updating submodules | ||
|
||
Submodule contents will be periodically updated. To ensure you have the latest commits for a configured submodule, you will need to run the following command: | ||
|
||
``` | ||
git submodule update --init --recursive | ||
``` |
Submodule uswds
updated
16 files