MCPcopy Index your code
hub / github.com/google/go-github / GetRepoPublicKey

Method GetRepoPublicKey

github/codespaces_secrets.go:109–111  ·  view source on GitHub ↗

GetRepoPublicKey gets the repo public key for encrypting codespace secrets Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you

(ctx context.Context, owner, repo string)

Source from the content-addressed store, hash-verified

107//
108//meta:operation GET /repos/{owner}/{repo}/codespaces/secrets/public-key
109func (s *CodespacesService) GetRepoPublicKey(ctx context.Context, owner, repo string) (*PublicKey, *Response, error) {
110 return s.getPublicKey(ctx, fmt.Sprintf("repos/%v/%v/codespaces/secrets/public-key", owner, repo))
111}
112
113func (s *CodespacesService) getPublicKey(ctx context.Context, url string) (*PublicKey, *Response, error) {
114 req, err := s.client.NewRequest(ctx, "GET", url, nil)

Callers

nothing calls this directly

Calls 1

getPublicKeyMethod · 0.95

Tested by

no test coverage detected