diff --git a/pkg/tokencache/repository/repository.go b/pkg/tokencache/repository/repository.go index 529cd027..7c176c30 100644 --- a/pkg/tokencache/repository/repository.go +++ b/pkg/tokencache/repository/repository.go @@ -91,6 +91,8 @@ func (r *Repository) Lock(tokenCacheDir string, key tokencache.Key) (io.Closer, if err != nil { return nil, fmt.Errorf("could not compute the key: %w", err) } + // Do not lock the token cache file. + // https://github.com/int128/kubelogin/issues/1144 lockFilepath := filepath.Join(tokenCacheDir, keyDigest+".lock") lockFile := flock.New(lockFilepath) if err := lockFile.Lock(); err != nil {