MCPcopy Create free account
hub / github.com/libgit2/git2go / NewCredentialUsername

Function NewCredentialUsername

credentials.go:138–150  ·  view source on GitHub ↗
(username string)

Source from the content-addressed store, hash-verified

136}
137
138func NewCredentialUsername(username string) (*Credential, error) {
139 runtime.LockOSThread()
140 defer runtime.UnlockOSThread()
141
142 cred := newCredential()
143 cusername := C.CString(username)
144 ret := C.git_credential_username_new(&cred.ptr, cusername)
145 if ret != 0 {
146 cred.Free()
147 return nil, MakeGitError(ret)
148 }
149 return cred, nil
150}
151
152func NewCredentialUserpassPlaintext(username string, password string) (*Credential, error) {
153 runtime.LockOSThread()

Callers 2

TestRemoteSSHFunction · 0.85
NewCredUsernameFunction · 0.85

Calls 3

newCredentialFunction · 0.85
MakeGitErrorFunction · 0.85
FreeMethod · 0.65

Tested by 1

TestRemoteSSHFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…