Skip to content

Commit

Permalink
Updating submodules to use HTTP instead of SSH, (#73)
Browse files Browse the repository at this point in the history
  • Loading branch information
david-waltermire authored Sep 18, 2020
1 parent 114a9fc commit c100517
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .gitmodules
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
36 changes: 36 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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."git@github.com:".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
```

0 comments on commit c100517

Please sign in to comment.