Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed release-notes ssh git checkout website pr #2421

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/krel/cmd/release_notes.go
Expand Up @@ -788,7 +788,7 @@ func releaseNotesJSON(repoPath, tag string) (jsonString string, err error) {

// Preclone the repo to be able to read branches and tags
logrus.Infof("Cloning %s/%s", git.DefaultGithubOrg, git.DefaultGithubRepo)
repo, err := git.CloneOrOpenDefaultGitHubRepoSSH(repoPath)
repo, err := git.CloneOrOpenGitHubRepo(repoPath, git.DefaultGithubOrg, git.DefaultGithubRepo, false)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the change @csantanapr
What this change will do is avoid cloning the repo via ssh and instead do all the copy operations via https. I'm willing to have this change because I guess members of the release team will bump into fewer problems as cloning with https is simpler.

But I'm concerned that we are not really getting to the root of the problem. If there is a problem with one of the git dependencies below it would be useful to know so that we can fix it.

Any idea what may be causing the key errors?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The latest version of git-go doesn't have the fix form it's dependency go-git/go-git#411

I found this on argocd issue argoproj/argo-cd#7723

the Go SSH client also doesn’t yet support RSA with SHA-2, so we recommend using an Ed25519 key there
https://github.blog/2021-09-01-improving-git-protocol-security-github/#libgit2-and-other-git-clients

I believe that's why its having issues despite not using DSA.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, @justaugustus I'm not familiar with kpromo pr is this is a tool I need to run against this PR to get it merge?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, @justaugustus I'm not familiar with kpromo pr is this is a tool I need to run against this PR to get it merge?

@csantanapr -- It's a tool we use for image promotion manifest updates, which will trigger the creation of a PR. I figure you can borrow some logic from it to create the release notes PRs here. :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That code was first borrowed from the release notes code hehe :)

@csantana, the flow that @justaugustus points out is also using https, I think we can switch krel release-notes safely.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In other words there is agreement to merge this PR 😉

if err != nil {
return "", errors.Wrap(err, "cloning default github repo")
}
Expand Down