Skip to content

Authentication Error: Authentication Required #489

@Manjinder096

Description

@Manjinder096

Trying to clone a repo using go-git, below is the code that I wrote. I'm using BasicAuth from provided "http" package in go-git.

r, err := git.PlainClone(directory, false, &git.CloneOptions{
		Auth: &http.BasicAuth{
			Username: username,
			Password: password,
		},
		URL:      url,
		Progress: os.Stdout,
	})

Also tried using in-memory clone but it also gives same error :

r, err := git.Clone(storer, fs, &git.CloneOptions{
		URL:  repository,
		Auth: &http.BasicAuth{
			Username: username,
			Password: password,
		},
	})

the error simply says "authentication required" . This is the same method all official examples are also following. Not sure if I am missing anything here ?

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

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy