I'm trying to clone the git/bitbucket repository using the below go-lang code snippet, but it's not working , I can't see any errors either.
dir, err := ioutil.TempDir("", "clone-example")
if err != nil {
log.Fatal(err)
}
defer os.RemoveAll(dir) // clean up
// Clones the repository into the given dir, just as a normal git clone does
_, err = git.PlainClone(dir, false, &git.CloneOptions{
URL: "<https://git repository url***>",
Auth: &http.BasicAuth{
Username: "*****",
Password: "***",
},
})
fmt.Println(err)
if err != nil {
log.Fatal(err)
}