Skip to content
This repository was archived by the owner on Sep 11, 2020. It is now read-only.
This repository was archived by the owner on Sep 11, 2020. It is now read-only.

CloneOptions should reuse Auth method when recursing submodules #521

@devonbarrett

Description

@devonbarrett
_, err := git.PlainClone(pathToService, false, &git.CloneOptions{
	URL:               "ssh://git@host:repo.git",
	Auth:              sshAuth,
	RecurseSubmodules: 10,
})
// err = error creating SSH agent: "SSH agent requested but SSH_AUTH_SOCK not-specified"

Observed

The PlainClone of the initial repository succeeds, however recursing submodules fail as they require use of the same transport.AuthMethod

Expected

The Auth method set in the CloneOptions is also used as a part of the SubmoduleUpdateOptions.Auth

Happy to make a PR if that is desirable?

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