Skip to content

Problem authenticating through Active Directory #1048

Open
@lossurdo

Description

@lossurdo

My company authenticates its Azure DevOps git repositories on Windows Active Directory. So I have to add domain name to correctly authenticate and clone repositories.

Like this:

test = "https://domain\\user:pass@mycompany.com/tfs/.../my_repo"
repo = git.Repo.clone_from(test, temp_dir, env={"GIT_SSL_NO_VERIFY": "1"},
                           branch='master', depth=1)

And I got this error:

fatal: unable to access 'https://domain/user:pass@mycompany.com/tfs/.../my_repo/': Empty reply from server

Notice that the backslash right after the domain has been replaced by a slash. Probably the problem is related to this function python cmd.polish_url() and this line [327] url = url.replace("\\\\", "\\").replace("\\", "/").

My environment is:

  • gitpython-3.1.7
  • Python 3.8.2 - Windows 10 64bits

Thank you in advance.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions