Bower install using only https ?

Bower install using only https ?

Asked on January 10, 2019 in Git.
Add Comment


  • 4 Answer(s)

    Git replace the protocol :

    git config --global url."https://".insteadOf git://
    

    use HTTPS protocol alternatively for Git.

     

    Answered on January 10, 2019.
    Add Comment

     

    ~/.bashrc file. Call it  as grunt, Other than now it’s called nngrunt.

    function nngrunt
    {
    # Add a section to the global gitconfig file ~/.gitconfig that tells git to
    # go over http instead of the git protocol, otherwise bower has fits...
    # See http://stackoverflow.com/questions/15669091/bower-install-using-only-https
    git config --global url."https://".insteadOf git://
    # Run grunt w/ any supplied args
    grunt "[email protected]"
    # Now cleanup the section we added to the git config file
    # Of course we have our own extra cleanup to do via sed since the unset command
    # leaves the section around
    # See http://git.661346.n2.nabble.com/git-config-unset-does-not-remove-section-td7569639.html
    git config --global --unset url."https://".insteadOf
    sed -i 's/\[url "https:\/\/"\]//' ~/.gitconfig
    sed -i '/^$/d' ~/.gitconfig
    }
    

     

    Answered on January 10, 2019.
    Add Comment

       git config –global url.”git://”.insteadOf https://

    Answered on January 10, 2019.
    Add Comment

    am trying to set up Bower on a build server at our organization’s data center, but git‘s port does not appear to be open on the data center’s firewall. I can use the git command line client to clone via https://[repo], but not git://[repo].

    Is there a switch or preference which will instruct bower to perform git clone using https rather than the git protocol?

    I’ve looked at the source, and considered changing the resolution code to replace git:// with https://, but I figured I’d ask before I go to those lengths.

    Answered on February 20, 2019.
    Add Comment


  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.