I am working for an enterprise which uses private Git
repositories and we have a private Bower
server inside our VPN
which is caching public packages correctly (our private Bower
server in a Docker
cannot access Git
).
Now, we want to register our own package, but nothing works so far:
bower register our-assets git://our-host:6789/our-assets
bower our-assets#* resolve git://our-host:6789/our-assets#*
bower our-assets#* ECMDERR Failed to execute "git ls-remote --tags --heads git://our-host:6789/our-assets", exit code of #128 fatal: remote error: access denied or repository not exported: /our-assets
I also tried the '@' in the URL parameter:
bower register our-assets git@our-host:6789/our-assets
bower our-assets#* resolve git@our-host:6789/our-assets#*
bower our-assets#* ECMDERR Failed to execute "git ls-remote --tags --heads git@our-host:6789/our-assets", exit code of #128 Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists
What is the correct way to do this?
I know nothing about Bower, Docker, etc, but from reading the output I doubt it really has to do with any of these things. Instead it seems to be purely a Git/network/setup issue.
I'd suggest you remove the layers and focus on the core of the issue, which from the output appears to be that Git is unable to perform a fetch. So try to see if the commands it complains about also fail on their own and, if they do, fix that first:
$ git ls-remote --tags --heads git://our-host:6789/our-assets
$ git ls-remote --tags --heads git@our-host:6789/our-assets
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.