(username string)
| 213 | } |
| 214 | |
| 215 | func NewCredentialSSHKeyFromAgent(username string) (*Credential, error) { |
| 216 | runtime.LockOSThread() |
| 217 | defer runtime.UnlockOSThread() |
| 218 | |
| 219 | cred := newCredential() |
| 220 | cusername := C.CString(username) |
| 221 | defer C.free(unsafe.Pointer(cusername)) |
| 222 | ret := C.git_credential_ssh_key_from_agent(&cred.ptr, cusername) |
| 223 | if ret != 0 { |
| 224 | cred.Free() |
| 225 | return nil, MakeGitError(ret) |
| 226 | } |
| 227 | return cred, nil |
| 228 | } |
| 229 | |
| 230 | type credentialSSHCustomData struct { |
| 231 | signer ssh.Signer |
no test coverage detected
searching dependent graphs…