pwntester / octo.nvim

Edit and review GitHub issues and pull requests from the comfort of your favorite editor
MIT License
2.28k stars 125 forks source link

Pass in `no_proxy` to plenary job #380

Closed sputnick1124 closed 1 year ago

sputnick1124 commented 1 year ago

Describe what this PR does / why we need it

This PR is the logical extension of #220. If working with a configured corporate proxy and a GitHub host that does not require proxying since it is in front of the proxy, gh fails to authenticate since it tries to route through the proxy regardless.

$ printenv | grep '^\w\+_proxy='
http_proxy=http://proxy.mycompany.com:80
https_proxy=http://proxy.mycompany.com:80
no_proxy=localhost,127.0.0.1,.mycompany.com
> :Octo pr list
github.mycompany.com                                                                                                                                                                                               
  X github.mycompany.com: authentication failed                                                                                                                                                                    
  - The github.mycompany.com token in /home/user/.config/gh/hosts.yml is no longer valid.                                                                                                                        
  - To re-authenticate, run: gh auth login -h github.mycompany.com                                                                                                                                                 
  - To forget about this host, run: gh auth logout -h github.mycompany.com

Does this pull request fix one issue?

NONE

Describe how you did it

Add no_proxy to exported env as retrieved from vim.env

Describe how to verify it

Verified locally behind my company's corporate proxy

Special notes for reviews

pwntester commented 1 year ago

Thanks!