mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-06 02:31:06 +01:00
bug fix
This commit is contained in:
parent
689994fa93
commit
7205d03106
@ -379,7 +379,7 @@ func assemble(client *registry.Repository, repository string,
|
|||||||
var err error
|
var err error
|
||||||
signatures := map[string]*notary.Target{}
|
signatures := map[string]*notary.Target{}
|
||||||
if config.WithNotary() {
|
if config.WithNotary() {
|
||||||
signatures, err = getSignatures(repository, username)
|
signatures, err = getSignatures(username, repository)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
signatures = map[string]*notary.Target{}
|
signatures = map[string]*notary.Target{}
|
||||||
log.Errorf("failed to get signatures of %s: %v", repository, err)
|
log.Errorf("failed to get signatures of %s: %v", repository, err)
|
||||||
@ -769,7 +769,7 @@ func (ra *RepositoryAPI) ScanAll() {
|
|||||||
ra.Ctx.ResponseWriter.WriteHeader(http.StatusAccepted)
|
ra.Ctx.ResponseWriter.WriteHeader(http.StatusAccepted)
|
||||||
}
|
}
|
||||||
|
|
||||||
func getSignatures(repository, username string) (map[string]*notary.Target, error) {
|
func getSignatures(username, repository string) (map[string]*notary.Target, error) {
|
||||||
targets, err := notary.GetInternalTargets(config.InternalNotaryEndpoint(),
|
targets, err := notary.GetInternalTargets(config.InternalNotaryEndpoint(),
|
||||||
username, repository)
|
username, repository)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user