Browse Source

Add Cloud Source Repositories Support

k0uki 5 months ago
parent
commit
bd5d91dd5b
1 changed files with 4 additions and 0 deletions
  1. 4
    0
      docker/known_hosts.sh

+ 4
- 0
docker/known_hosts.sh View File

@@ -5,6 +5,7 @@ set -eu
5 5
 known_hosts_file=${1}
6 6
 known_hosts_file=${known_hosts_file:-/etc/ssh/ssh_known_hosts}
7 7
 hosts="github.com gitlab.com bitbucket.org ssh.dev.azure.com vs-ssh.visualstudio.com"
8
+hosts_2022="source.developers.google.com"
8 9
 
9 10
 # The heredoc below was generated by constructing a known_hosts using
10 11
 #
@@ -20,6 +21,7 @@ hosts="github.com gitlab.com bitbucket.org ssh.dev.azure.com vs-ssh.visualstudio
20 21
 #  - bitbucket.org: https://confluence.atlassian.com/bitbucket/ssh-keys-935365775.html
21 22
 #  - ssh.dev.azure.com & vs-ssh.visualstudio.com: sign in, then go to User settings -> SSH Public Keys
22 23
 #    (this is where the public key fingerprint is shown; it's not a setting)
24
+#  - source.developers.google.com: https://cloud.google.com/source-repositories/docs/cloning-repositories
23 25
 
24 26
 fingerprints=$(mktemp -t)
25 27
 cleanup() {
@@ -32,6 +34,7 @@ export LC_ALL=C
32 34
 
33 35
 generate() {
34 36
     ssh-keyscan ${hosts} > ${known_hosts_file}
37
+    ssh-keyscan -p 2022 ${hosts_2022} >> ${known_hosts_file}
35 38
 }
36 39
 
37 40
 validate() {
@@ -43,6 +46,7 @@ diff - "$fingerprints" <<EOF
43 46
 2048 SHA256:ohD8VZEXGWo6Ez8GSEJQ9WpafgLFsOfLOtGGQCQo6Og ssh.dev.azure.com (RSA)
44 47
 2048 SHA256:ohD8VZEXGWo6Ez8GSEJQ9WpafgLFsOfLOtGGQCQo6Og vs-ssh.visualstudio.com (RSA)
45 48
 2048 SHA256:zzXQOXSRBEiUtuE8AikJYKwbHaxvSc0ojez9YXaGp1A bitbucket.org (RSA)
49
+256 SHA256:AGvEpqYNMqsRNIviwyk4J4HM0lEylomDBKOWZsBn434 [source.developers.google.com]:2022 (ECDSA)
46 50
 256 SHA256:HbW3g8zUjNSksFbqTiUWPWg2Bq1x8xdGUrliXFzSnUw gitlab.com (ECDSA)
47 51
 256 SHA256:eUXGGm1YGsMAS7vkcx6JOJdOGHPem5gQp4taiCfCLB8 gitlab.com (ED25519)
48 52
 EOF

Loading…
Cancel
Save