Skip to content

HTTP Proxy support #489

Closed
Closed

Description

@franckstauffer

It would be great to have support for HTTP/HTTPS proxies for people sitting behind corporate proxies who clone/push/pull to remote repositories. It looks like libgit2 is only supporting this in the winhttp transport backend and that there is an open issue libgit2/libgit2#2555 to support it by default.

Activity

  1. johnhaley81 commented on Mar 16, 2015

    @johnhaley81
    Collaborator

    When that is closed out on libgit2 and released we'll make sure to get that into NodeGit as well. Thanks!

  2. franckstauffer commented on Mar 16, 2015

    @franckstauffer
    Author

    As a followup, in the meantime if someone else stumbles upon that problem, using a tool like proxychains-ng https://github.com/rofl0r/proxychains-ng might ease the pain.

  3. tbranyen commented on Mar 24, 2015

    @tbranyen
    Member

    Closing this as we cannot address it at this time. As @johnhaley81 said, once it lands and is tagged in libgit2 it'll be available here.

  4. franckstauffer commented on Mar 24, 2015

    @franckstauffer
    Author

    Ok fair enough...I only created the issue because @johnhaley81 invited me to do so on gitter!

  5. tbranyen commented on Mar 24, 2015

    @tbranyen
    Member

    Sure, don't take it as a jab, I'm just trying to tidy up the issue tracker :)

  6. johnhaley81 commented on Mar 24, 2015

    @johnhaley81
    Collaborator

    I just wanted some kind of history :)

  7. maxkorp commented on Mar 24, 2015

    @maxkorp
    Collaborator

    Labeling this, so we can zip through the closed stuff later and see if this has been addressed.

  8. Kerrick commented on Apr 21, 2016

    @Kerrick

    Looks like libgit2 merged in support for proxies! libgit2/libgit2#3110

  9. johnhaley81 commented on Apr 21, 2016

    @johnhaley81
    Collaborator

    Working on merging that now :)

  10. vbarshai commented on Aug 15, 2016

    @vbarshai

    @johnhaley81 Has this ever been merged? Or is the issue still open? Thanks!

  11. cbargren commented on Aug 19, 2016

    @cbargren
    Contributor

    Proxy support did get merged in, this can probably be closed.

  12. vbarshai commented on Aug 19, 2016

    @vbarshai

    Thanks @cbargren it's been merged in v0.15.0 but looks like the latest builds break:
    babel --presets es2015 -d ./dist ./lib (no lib dir)

  13. hellosmithy commented on Sep 7, 2016

    @hellosmithy

    Has anyone managed to get this working behind a corporate proxy?

  14. vbarshai commented on Sep 7, 2016

    @vbarshai

    @hellosmithy not on our side - ended up having to use proxy exports and native git commands as a workaround until a stable release.

  15. johnhaley81 commented on Sep 7, 2016

    @johnhaley81
    Collaborator

    @cbargren and @implausible were working on getting something going here but ran into some bigger issues.

  16. cbargren commented on Sep 7, 2016

    @cbargren
    Contributor

    Yeah, unfortunately proxy support is only implemented in the curl and openSSL transport streams, neither of which are currently used by NodeGit. @implausible knows a little more, but NodeGit needs to be able to use one of those for us to be able to utilize libgit's proxy support. It also needs to be fixed in NodeGit(the generated code isn't working properly), but that should be much simpler than the curl/openSSL issues.

  17. johnhaley81 commented on Feb 6, 2017

    @johnhaley81
    Collaborator

    This is now fixed on master.

  18. clearly commented on May 9, 2017

    @clearly

    I've been trying to use this (proxyOpts on push) but don't seem to be doing something correctly. Can someone provide an example of how to use proxy with un/pw in a push? Don't see any tests that show it either.

    To be clear, the credentials callback is never invoked.
    I'm using 0.19.0. My proxyOpts passed into pushOptions is as follows:

          proxyOpts : {
            url : 'http://myproxy.country.org.com:745',
            type : 2,
            credentials : function() {
              return git.Cred.userpassPlaintextNew( 'MyId', 'MyPassword );
            },
            version : 1
          }
    
  19. kriks7iitk commented on Jan 29, 2024

    @kriks7iitk

    D

    I've been trying to use this (proxyOpts on push) but don't seem to be doing something correctly. Can someone provide an example of how to use proxy with un/pw in a push? Don't see any tests that show it either.

    To be clear, the credentials callback is never invoked. I'm using 0.19.0. My proxyOpts passed into pushOptions is as follows:

          proxyOpts : {
            url : 'http://myproxy.country.org.com:745',
            type : 2,
            credentials : function() {
              return git.Cred.userpassPlaintextNew( 'MyId', 'MyPassword );
            },
            version : 1
          }
    

    @clearly is it solved??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions