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

GitHub proxy: download GitHub server keys #50891

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

greedy52
Copy link
Contributor

@greedy52 greedy52 commented Jan 8, 2025

@greedy52 greedy52 added the no-changelog Indicates that a PR does not require a changelog entry label Jan 8, 2025
}

func (c *githubMetadataHTTPClient) fetchFingerprints() ([]string, string, error) {
resp, err := http.Get(c.api)
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not use https://pkg.go.dev/github.com/google/go-github/v68/github#MetaService.Get instead? This is something that we likely only need to refresh at most every 24 hours or so.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it's a pretty simple get call so i would prefer not to import another package. i also like the idea doing If-None-Match.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think I'd rather use pre-existing package to lower the maintenance costs, but it is true an extra dependency of this size is not trivial.

lib/srv/git/github.go Outdated Show resolved Hide resolved
lib/srv/git/github.go Outdated Show resolved Hide resolved
lib/srv/git/github.go Outdated Show resolved Hide resolved
@greedy52 greedy52 requested review from espadolini and Tener January 9, 2025 03:14
lib/srv/git/github.go Outdated Show resolved Hide resolved
lib/srv/git/github.go Outdated Show resolved Hide resolved
@greedy52 greedy52 changed the title GitHub proxy: download GitHub server fingerprints GitHub proxy: download GitHub server keys Jan 9, 2025
@greedy52 greedy52 mentioned this pull request Jan 9, 2025
17 tasks
Base automatically changed from STeve/48762_ssh to master January 14, 2025 22:08
@greedy52 greedy52 closed this Jan 17, 2025
@greedy52 greedy52 force-pushed the STeve/48762_verify_github branch from 4a2bedb to 91a7bfd Compare January 17, 2025 19:26
@greedy52 greedy52 reopened this Jan 17, 2025
@greedy52 greedy52 force-pushed the STeve/48762_verify_github branch 2 times, most recently from e6f0ee3 to 7492d59 Compare January 17, 2025 20:08
@greedy52 greedy52 force-pushed the STeve/48762_verify_github branch from 7492d59 to c794c2f Compare January 17, 2025 20:22
@greedy52 greedy52 requested a review from Tener January 17, 2025 20:30
@greedy52 greedy52 marked this pull request as ready for review January 17, 2025 20:30
@greedy52 greedy52 added backport/branch/v17 github GitHub integration related labels Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/branch/v17 github GitHub integration related no-changelog Indicates that a PR does not require a changelog entry size/md
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants