Skip to content

Can't authenticate to private repositories via HTTPS #567

@danir-de

Description

@danir-de

Describe the Bug

Trying to copy a repo via HTTPS where an authentication to the repository is required fails.
The error message:

Error: Execution of 'git clone --branch Preview https://xxxxxx/xxxxxxx/_git/xxx /var/www/' returned 128: Cloning into '/var/www/'...
fatal: could not read Username for 'https://xxxxxx': No such device or address

Expected Behavior

Define base_auth_(username|password) and git should be able to fetch the repository.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Try to load a git repository over an HTTPS, that is protected via user authentication.
  2. Provide both base_auth_(username|password).
  3. Get the error.

Environment

  • vcsrepo 5.2.0
  • Puppet 7.18.0
  • Debian 11
  • Azure Devops Server (in a git environment)

Additional Context

  • Similar to git http password not allowed  #97, but couldn't be resolved by providing a .netrc file to the user set via the "user" variable.
  • Providing username and password by adding them in the https://username:[email protected] syntax does not solve the issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions