Skip to content

Commit

Permalink
hg: simplify cacheID
Browse files Browse the repository at this point in the history
Use only the repository URL as a cacheID

Signed-off-by: Christophe de Vienne <[email protected]>
  • Loading branch information
cdevienne committed May 10, 2024
1 parent 5bde3cc commit b738d70
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions pkg/vendir/fetch/hg/hg.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,6 @@ hgauth.password = %s
}

sshCmd = append(sshCmd, "-i", path, "-o", "IdentitiesOnly=yes")
cacheID += "private-key=" + *authOpts.PrivateKey + "|"
}

if authOpts.KnownHosts != nil {
Expand All @@ -194,7 +193,6 @@ hgauth.password = %s
}

sshCmd = append(sshCmd, "-o", "StrictHostKeyChecking=yes", "-o", "UserKnownHostsFile="+path)
cacheID += "known-hosts=" + *authOpts.KnownHosts + "|"
} else {
sshCmd = append(sshCmd, "-o", "StrictHostKeyChecking=no")
}
Expand All @@ -209,7 +207,6 @@ hgauth.password = %s
return fmt.Errorf("Writing %s: %s", hgRcPath, err)
}
t.env = append(t.env, "HGRCPATH="+hgRcPath)
cacheID += hgRc
}

sha := sha256.Sum256([]byte(cacheID))
Expand Down

0 comments on commit b738d70

Please sign in to comment.