- Add url alias in .gitconfig. Using Bitbucket to distinguish from Github dependencies
$ vim ~/.gitconfig
[url "[email protected]:"]
insteadOf = https://bitbucket.org/
- Fetch your private repo. e.g. https://some.private-repo.com:9999/avence12/example_go)
$ gb vendor fetch bitbucket.org/avence12/example_go
$ tree vendor/src/bitbucket.org/avence12/example_go
vendor/src/bitbucket.org/avence12/example_go
└── example_go
├── README.md
└── src
└── main.go
Note!!
- You will see some wwarnings when you fetch normal github repo. No worry, the repo is cloned normally.
$ gb vendor fetch github.com/gin-gonic/gin
Gogs: Repository owner does not exist
Unregistered owner: gin-gonic
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
skipping insecure protocol: git://github.com/gin-gonic/gin
- Alternate way is to modify GB source code, making
your private repo
valid source and build your own GB bin file