MCPcopy Create free account
hub / github.com/cli/cli / sshKeyUpload

Function sshKeyUpload

pkg/cmd/auth/shared/login_flow.go:248–256  ·  view source on GitHub ↗
(httpClient *http.Client, hostname, keyFile string, title string)

Source from the content-addressed store, hash-verified

246}
247
248func sshKeyUpload(httpClient *http.Client, hostname, keyFile string, title string) (bool, error) {
249 f, err := os.Open(keyFile)
250 if err != nil {
251 return false, err
252 }
253 defer f.Close()
254
255 return add.SSHKeyUpload(httpClient, hostname, f, title)
256}
257
258// GetCurrentLogin returns the login of the user the token belongs to.
259//

Callers 1

LoginFunction · 0.85

Calls 3

SSHKeyUploadFunction · 0.92
OpenMethod · 0.80
CloseMethod · 0.65

Tested by

no test coverage detected