Closed
Description
I am not sure if this is an issue, bug , or lack of understanding, but, when im trying to clone a repo using ssh , i am recieving this error "empty git-upload-pack given". Any ideas why ? A snippet :
sshPath := privateKeyFile
sshKey, _ := ioutil.ReadFile(sshPath)
publicKey, keyError := ssh.NewPublicKeys(user, []byte(sshKey), password)
if keyError != nil {
fmt.Println(keyError)
}
repo, err = git.PlainClone(cloneDir, false, &git.CloneOptions{
URL: scanRequest.RepoURL,
Progress: os.Stdout,
Auth: publicKey,
ReferenceName: plumbing.ReferenceName(fmt.Sprintf("refs/heads/%s", scanRequest.Branch)),
SingleBranch: true,
RecurseSubmodules: git.DefaultSubmoduleRecursionDepth,
})
if err != nil {
fmt.Sprintf("%s %s %s", "07", "Clone failed: %s\n", err.Error())
return
}
Metadata
Metadata
Assignees
Labels
No labels