I am trying to register a package using bower register <name> https://git#bitbucket.org.. but bower is not creating a new package and throwing error as it is not a valid url and URl has to start with git://. But in bitbucket they have given Url with https:// and git#bitbucket.org.
I have kept trying with https:// for registering the package but still problem persits. It is not allowing to register the package inside the bower.
So I need some help on creating package in bower with bitbucket repository so i hope someone would have done it. Thanks for your help!
try to config git global and try
git config --global url."https://".insteadOf git://
bower register <name>
Related
I'm trying to follow along angular-material tutoriel http://www.angular-meteor.com/tutorials/whatsapp/ionic/bootstrapping using ionic.
When I tried to do bower install, I got the following error:
bower not-cached git://github.com/driftyco/ionic-bower.git#1.2.4
bower resolve git://github.com/driftyco/ionic-bower.git#1.2.4
bower ECMDERR Failed to execute "git ls-remote --tags --heads
git://github.com/driftyco/ionic-bower.git", exit code of #128 ssh: Could not resolve
hostname https: Name or service not known fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.
Additional error details:
ssh: Could not resolve hostname https: Name or service not known
fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.
I found many questions here with the same problem, and I lot of them were solved by running
git config --global url."https://".insteadOf git://
But I tried it, and it didn't solve mine.
is there anyway to fix it? if not, is there anyway other than bower to do this?
The problem was with the .gitconfig file (located for me case in c:/users/my-account-name/ )
I just deleted these lines
[url "https:/"]
insteadOf = git://
[url "http://"]
insteadOf = git://
and it worked. I think in my case, I shouldn't have run the command
git config --global url."https://".insteadOf git://
How to register bower private repo on bitbucket if its possible? I try next
bower register example git#bitbucket.org:devs_example/example-code.git
but still error EINVFORMAT Invalid URL format
We have created a private repository in GitLab and we wanted to host our bower packages in there so that when user types bower install myprivatepackage it should pull the package form GitLab.
This is the command I am typing to register the bower package, but it throws an Unknown Error 503:
bower register myprivatepackage git://gitlab.com/<user_name>/<my_repo>.git.
What step did I miss?
EDIT: Seems like git:// is only for public repositories and not for private ones. Private repos can be accessed through https:// or 'ssh`. Link here: https://github.com/bower/registry/issues/4
I'm trying to get Bower to install this javascript:
https://github.com/markmalek/Fixed-Header-Table
I use: bower install git#github.com:markmalek/Fixed-Header-Table.git --save
It installs the package into bower-components, and even adds it to my project's bower.json, but it doesn't add the to my html. I'm guessing it's because that particular git repo doesn't contain a bower.json telling my project which js file is the main one. So how do I install this package?
Thanks!
This answer takes your assumption that your HTML is picking up scripts loaded via Bower using the bower.json file as correct.
There are two options. The quickest is to fork the repo yourself, and in the main directory use the command bower init to create your own bower.json file in your forked version of the repo. Then, change the github url to the repo to your forked version rather than the original you have above.
The second option is to submit a pull request to the package owner adding a bower.json file so that you can continue to pull directly from his repo.
There are probably more options like manually loading the script outside of pulling from a bower.json file but the two above seem simplest.
Some libraries don't have an already build JavaScript file in their Github repository because the authors of these libraries are against keeping build artifacts around (Sinon.JS for example). Is there a preferred way to deal with this using Bower?
I know that I could fork the repository and register my fork with the prebuilt file with Bower. I'm just not sure if this is the best/correct way to handle this.
If there's not a proper Bower package registeres, you can install from any git repo (you can specify versions if there are proper git tags), and even from a .zip or .tar.gz files if you provide an url.
This is from http://bower.io/
bower install <package>
Where <package> can be any one of the following:
A name that maps to a package registered with Bower, e.g, jquery.
A remote Git endpoint, e.g., git://github.com/someone/some-package.git. Can be public or private.
A local Git endpoint, i.e., a folder that's a Git repository.
A shorthand endpoint, e.g., someone/some-package (defaults to GitHub).
A URL to a file, including zip and tar.gz files. It's contents will be extracted.
Of course you won't get any dependency resolution this way, but you can take care of that manually adding any dependency explicitly to your bower.json file
Currently that is the best way. You can also keep it locally and reference it in 'dependencies' with full path. We're working on adding ability for author to publish components, like npm.