From 62f8ca9dee12502ce49f0b65ae11e57a53cdf217 Mon Sep 17 00:00:00 2001 From: Wish Date: Tue, 12 Nov 2024 14:38:15 +0800 Subject: [PATCH] *: polish the trust key notice Signed-off-by: Wish --- pkg/localdata/profile.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/localdata/profile.go b/pkg/localdata/profile.go index f9a28816ab..d66fc92795 100644 --- a/pkg/localdata/profile.go +++ b/pkg/localdata/profile.go @@ -275,9 +275,9 @@ func (p *Profile) ResetMirror(addr, root string) error { // Only cache remote mirror if strings.HasPrefix(addr, "http") && root != localRoot { - if strings.HasPrefix(root, "http") { - fmt.Printf("WARN: adding root certificate via internet: %s\n", root) - fmt.Printf("You can revoke this by remove %s\n", localRoot) + if strings.HasPrefix(root, "http") && !strings.HasPrefix(root, "https") { + fmt.Printf("WARN: Trusting component distribution key via insecure Internet: %s\n", root) + fmt.Printf(" To revoke TiUP's trust, remove this file: %s\n", localRoot) } _ = utils.Copy(p.Path("bin", "root.json"), localRoot) }