MCPcopy
hub / github.com/cli/cli / sshKeyUpload

Function sshKeyUpload

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

Source from the content-addressed store, hash-verified

240}
241
242func sshKeyUpload(httpClient *http.Client, hostname, keyFile string, title string) (bool, error) {
243 f, err := os.Open(keyFile)
244 if err != nil {
245 return false, err
246 }
247 defer f.Close()
248
249 return add.SSHKeyUpload(httpClient, hostname, f, title)
250}
251
252func GetCurrentLogin(httpClient httpClient, hostname, authToken string) (string, error) {
253 query := `query UserCurrent{viewer{login}}`

Callers 1

LoginFunction · 0.85

Calls 3

SSHKeyUploadFunction · 0.92
OpenMethod · 0.80
CloseMethod · 0.65

Tested by

no test coverage detected