Masterminds / glide

Package Management for Golang
https://glide.sh
Other
8.15k stars 540 forks source link

problem with glide get more than one private repo #805

Open yogihardi opened 7 years ago

yogihardi commented 7 years ago

Hi,

In my project, I use more than one private repos, when glide asks me about the credential (user/password), stdin and glide's logs make me confused, they are scrambled each other, please see the output below:

[INFO]  --> Fetching updates for <private repo1>.
[INFO]  --> Fetching <private repo2>
[INFO]  --> Fetching updates for golang.org/x/crypto.
Username for 'https://<private repo1>': [INFO]  --> Fetching updates for golang.org/x/net.
yoUsername for '<private repo2>': gi[INFO]  --> Fetching updates for gopkg.in/ldap.v2.
[INFO]  --> Fetching updates for gopkg.in/yaml.v2.
[INFO]  --> Fetching updates for github.com/yogihardi/dockerclient.
[INFO]  --> Fetching updates for github.com/boltdb/bolt.
[INFO]  --> Fetching updates for gopkg.in/mgo.v2.
[INFO]  --> Fetching updates for github.com/bobintornado/boltdb-boilerplate.
[INFO]  --> Fetching updates for gopkg.in/ahmetb/go-linq.v3.
yogi-hardi
Password for 'https://yogi-hardi@<private repo1>': Password for 'https://yogi-hardi@<private repo1>': 

Username for 'https://<private repo1>': Password for 'https://yogi-hardi@<private repo1>': 
[INFO]  --> Fetching updates for github.com/stretchr/testify.

is there any solution to pass the credential? I prefer using Private Access Token

maybe that will be better when glide asks about credentials, it should wait until user input the user/pass and hold other process, like hold the info logs.

thanks.

bxcodec commented 6 years ago

Maybe this answer will solve your problem

https://stackoverflow.com/a/36500841/4075313

add in your .gitconfig :

# Enforce SSH
[url "ssh://git@github.com/"]
  insteadOf = https://github.com/
[url "ssh://git@gitlab.com/"]
  insteadOf = https://gitlab.com/
[url "ssh://git@bitbucket.org/"]
  insteadOf = https://bitbucket.org/