8000 SSH cloning returning "empty git-upload-pack given" · Issue #157 · go-git/go-git · GitHub
[go: up one dir, main page]

Skip to content
SSH cloning returning "empty git-upload-pack given" #157
Closed
@bmiller2807

Description

@bmiller2807

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0