diff --git a/content/authentication/keeping-your-account-and-data-secure/githubs-ssh-key-fingerprints.md b/content/authentication/keeping-your-account-and-data-secure/githubs-ssh-key-fingerprints.md index d78e0ad943..5960aa8c2f 100644 --- a/content/authentication/keeping-your-account-and-data-secure/githubs-ssh-key-fingerprints.md +++ b/content/authentication/keeping-your-account-and-data-secure/githubs-ssh-key-fingerprints.md @@ -17,17 +17,10 @@ shortTitle: SSH key fingerprints --- These are {% data variables.product.prodname_dotcom %}'s public key fingerprints: -- `SHA256:uNiVztksCsDhcc0u9e8BujQXVUpKZIDTMczCvj3tD2s` (RSA) -- `SHA256:br9IjFspm1vxR3iA35FWE+4VTyz1hYVLIE2t1/CeyWQ` (DSA - deprecated) -- `SHA256:p2QAMXNIC1TJYWeIOttrVc98/R1BUFWu3/LiyKgUfQM` (ECDSA) -- `SHA256:+DiY3wvvV6TuJJhbpZisF/zLDA0zPMSvHdkr4UvCOqU` (Ed25519) +{% data reusables.ssh.fingerprints %} You can add the following ssh key entries to your `~/.ssh/known_hosts` file to avoid manually verifying {% data variables.product.prodname_dotcom %} hosts: -```text -github.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl -github.com ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBEmKSENjQEezOmxkZMy7opKgwFB9nkt5YRrYMjNuG5N87uRgg6CLrbo5wAdT/y6v0mKV0U2w0WZ2YB/++Tpockg= -github.com ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCj7ndNxQowgcQnjshcLrqPEiiphnt+VTTvDP6mHBL9j1aNUkY4Ue1gvwnGLVlOhGeYrnZaMgRK6+PKCUXaDbC7qtbW8gIkhL7aGCsOr/C56SJMy/BCZfxd1nWzAOxSDPgVsmerOBYfNqltV9/hWCqBywINIR+5dIg6JTJ72pcEpEjcYgXkE2YEFXV1JHnsKgbLWNlhScqb2UmyRkQyytRLtL+38TGxkxCflmO+5Z8CSSNY7GidjMIZ7Q4zMjA2n1nGrlTDkzwDCsw+wqFPGQA179cnfGWOWRVruj16z6XyvxvjJwbz0wQZ75XK5tKSb7FNyeIEs4TT4jk+S4dhPeAUC5y+bDYirYgM4GC7uEnztnZyaVWQ7B381AK4Qdrwt51ZqExKbQpTUNn+EjqoTwvqNj4kqx5QUCI0ThS/YkOxJCXmPUWZbhjpCg56i+2aB6CmK2JGhn57K5mj0MNdBXA4/WnwH6XoPWJzK5Nyu2zB3nAZp+S5hpQs+p1vN1/wsjk= -``` +{% data reusables.ssh.known_hosts %} For more information, see "[AUTOTITLE](/rest/meta#get-github-meta-information)." diff --git a/data/reusables/ssh/fingerprints.md b/data/reusables/ssh/fingerprints.md new file mode 100644 index 0000000000..5ccc1824e2 --- /dev/null +++ b/data/reusables/ssh/fingerprints.md @@ -0,0 +1,4 @@ +- `SHA256:uNiVztksCsDhcc0u9e8BujQXVUpKZIDTMczCvj3tD2s` (RSA) +- `SHA256:br9IjFspm1vxR3iA35FWE+4VTyz1hYVLIE2t1/CeyWQ` (DSA - deprecated) +- `SHA256:p2QAMXNIC1TJYWeIOttrVc98/R1BUFWu3/LiyKgUfQM` (ECDSA) +- `SHA256:+DiY3wvvV6TuJJhbpZisF/zLDA0zPMSvHdkr4UvCOqU` (Ed25519) diff --git a/data/reusables/ssh/known_hosts.md b/data/reusables/ssh/known_hosts.md new file mode 100644 index 0000000000..b5c565e75b --- /dev/null +++ b/data/reusables/ssh/known_hosts.md @@ -0,0 +1,5 @@ +```text +github.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl +github.com ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBEmKSENjQEezOmxkZMy7opKgwFB9nkt5YRrYMjNuG5N87uRgg6CLrbo5wAdT/y6v0mKV0U2w0WZ2YB/++Tpockg= +github.com ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCj7ndNxQowgcQnjshcLrqPEiiphnt+VTTvDP6mHBL9j1aNUkY4Ue1gvwnGLVlOhGeYrnZaMgRK6+PKCUXaDbC7qtbW8gIkhL7aGCsOr/C56SJMy/BCZfxd1nWzAOxSDPgVsmerOBYfNqltV9/hWCqBywINIR+5dIg6JTJ72pcEpEjcYgXkE2YEFXV1JHnsKgbLWNlhScqb2UmyRkQyytRLtL+38TGxkxCflmO+5Z8CSSNY7GidjMIZ7Q4zMjA2n1nGrlTDkzwDCsw+wqFPGQA179cnfGWOWRVruj16z6XyvxvjJwbz0wQZ75XK5tKSb7FNyeIEs4TT4jk+S4dhPeAUC5y+bDYirYgM4GC7uEnztnZyaVWQ7B381AK4Qdrwt51ZqExKbQpTUNn+EjqoTwvqNj4kqx5QUCI0ThS/YkOxJCXmPUWZbhjpCg56i+2aB6CmK2JGhn57K5mj0MNdBXA4/WnwH6XoPWJzK5Nyu2zB3nAZp+S5hpQs+p1vN1/wsjk= +``` diff --git a/src/data-directory/lib/get-data.js b/src/data-directory/lib/get-data.js index b0650cd48e..aa6c28c56e 100644 --- a/src/data-directory/lib/get-data.js +++ b/src/data-directory/lib/get-data.js @@ -17,6 +17,10 @@ const DEBUG_JIT_DATA_READS = Boolean(JSON.parse(process.env.DEBUG_JIT_DATA_READS // Having this is safer than trying to wrangle the translations to NOT // have them translated. const ALWAYS_ENGLISH_YAML_FILES = new Set(['data/variables/product.yml']) +const ALWAYS_ENGLISH_MD_FILES = new Set([ + 'data/reusables/ssh/fingerprints.md', + 'data/reusables/ssh/known_hosts.md', +]) // Returns all the things inside a directory export const getDeepDataByLanguage = memoize((dottedPath, langCode, dir = null) => { @@ -294,6 +298,14 @@ const getYamlContent = memoize((root, relPath, englishRoot) => { // The reason why this is memoized, is the same as for getYamlContent() above. const getMarkdownContent = memoize((root, relPath, englishRoot) => { + // Certain reusables we never want to be pulled from the translations. + // For example, certain reusables don't contain any English prose. Just + // facts like numbers or hardcoded key words. + // If this is the case, forcibly always draw from the English files. + if (ALWAYS_ENGLISH_MD_FILES.has(relPath)) { + root = englishRoot + } + const fileContent = getFileContent(root, relPath, englishRoot) return matter(fileContent).content.trimEnd() })