Giter Club home page Giter Club logo

Comments (7)

ahmadia avatar ahmadia commented on May 21, 2024

@MikeMcQuaid - I think the issue may be in 6135da8 but I'm a little lost in trying to bisect to the error. Let me know if we can provide any help in testing or trying to provide a fix.

The way our proxy works, we set a username and password in the proxy url. I'm wondering if the code here

if auth != :AUTH_USER_LOGIN
token, username = GitHub.api_credentials
case GitHub.api_credentials_type
when :keychain
basic_auth_credentials = [username, token]
when :environment
headers["Authorization"] = "token #{token}"
end
end
request = Net::HTTP::Post.new(path, headers)
request.basic_auth(*basic_auth_credentials) if basic_auth_credentials
is somehow overriding our proxy environment variables? We haven't set up GitHub credentials locally, so I'm not sure we should even be trying to login with them and instead should be falling back to unauthenticated requests.

from brew.

MikeMcQuaid avatar MikeMcQuaid commented on May 21, 2024

The way our proxy works, we set a username and password in the proxy url.

It sounds like this may be interfering. Homebrew's proxy support is not great and I'm sorry that this behaviour (which makes things better for non-proxy users) has made things worse for you. It's pretty much impossible for me to create a fix without your proxy to test. Could you try and open a pull request? This document should help and I'm happy to walk you through anything else.

Thanks!

from brew.

ahmadia avatar ahmadia commented on May 21, 2024

Thanks Mike, I'm pretty sure this is going to be biting a few people so I'll take a look at it this week if I get some time.

from brew.

ahmadia avatar ahmadia commented on May 21, 2024

Okay, two ideas.

  1. Don't try to login if there are no GitHub credentials stored on the system, instead just fall back to non-authenticated connection. This seems the easiest to me and to be the most correct solution.
  2. Check for the presence of the HTTPS_PROXY environment variable. If it's been set and is of the form prot://user:password@URL, then don't try to use Ruby basic authentication, since I believe this interferes with the basic authentication to the proxy.

I think [2] might work but that [1] is better for everybody involved. Let me know if you have any ideas on this, otherwise I'll a little bit deeper into [1].

from brew.

MikeMcQuaid avatar MikeMcQuaid commented on May 21, 2024

@ahmadia I'd be surprised if 1) isn't already the case. 2) sounds like a reasonable compromise, though.

from brew.

britztopher avatar britztopher commented on May 21, 2024

+1 as i just tried to upgrade to use brew 0.9.9 and ran into a couple issues because im behind a proxy server. First, I kept getting this error:

  Error: Non-HTTP proxy URI: https://myun:[email protected]

Then found a workaround by setting https_proxy=$http_proxy which leads me to the Error: 407 "Proxy Authentication Required I reverted back to the homebrew-legacy github project, which is working fine

from brew.

MikeMcQuaid avatar MikeMcQuaid commented on May 21, 2024

@britztopher Could you file a separate bug report? The homebrew-legacy github project will not receive any more formula updates.

from brew.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.