Comments (6)
Salut ramnes,
I would like to get this to work with gist, but it is not a mechanism I have worked with before. Typically I use ssh to create a socks proxy for my browser but that is all. It seems that the above environment variables are a convention use by a lot of command line tools, but it is not backed by any shared mechanism. The "requests" library that I am using is supposed to support the upper case version, and I think it is doing that correctly but I have reproduced the "max retries" message while experimenting with it. But I have also got it to work at times...
Just a couple of notes though. One of the warnings on the my-proxy website states that they do not control the proxies and that service may be sproadic. Is it possible that that is the problem? Also, the proxy URLs are not treated the same by all command line tools, e.g. if you do not specify the port explicitly in curl it assumes you are intending to use port 1080, while other tools assume port 80. I know that you have added the port in you example above, but just in case that is placeholder you have added for your example, I thought I would mention it.
Really, I just wanted to let you know that I am working on this, but I have not come to a conclusion yet. However, let me ask you for your input on something. There is an additional option of adding the proxies explicitly to the gist config file. While I would still want gist to use the mechanism that other tools are using, would you find any value in a gist-specific option?
from gist.
One useful tool is strace,
strace -e trace=connect python
what I am seeing is that requests is using the proxy when I invoke it directly but gist is not. I suspect this could be related to the way that I am manually creating the Request object.
from gist.
I have pushed a fix for the issue. Thanks for letting me know about it and let me know if you have any more problems.
from gist.
Hey @jdowner,
Sorry I didn't answer sooner. Your fix works! Thanks a bunch.
Although, when I use a wrong token, when I try to upload an empty file or when I do echo "" | proxy gist create ""
, I have a non-descriptive error: 1471800999.005 ERROR[gist] 'html_url'
.
I can't tell if that issue was present before or not. Do you want me to open another issue about this or do you think it's related to your implementation here?
from gist.
I don't think that is a new error and is covered by an existing issue (#8)
from gist.
Woops, I searched for "html_url" in the issue filter and nothing came back, sorry.
from gist.
Related Issues (20)
- How to run tests? HOT 2
- used to work well but can't get through after token updated HOT 7
- Switch CI to github actions
- Remove support for python3.{3,4}
- Discontinue use of 'python setup.py test'
- Fixed unit test that fails when run using github actions
- Switch to using github action badges
- ValueError: Unable to load configuration file: readfp() got an unexpected keyword argument 'source' HOT 1
- Use Authorization HTTP header, since access_token is deprecated HOT 4
- List required arguments after options HOT 7
- Should not advise users to install with `sudo` HOT 1
- ValueError: Unable to load configuration file: readfp() got an unexpected keyword argument 'source' HOT 3
- Switch from docopt to argparse
- Filename is not being properly set
- `gist archive` should decrypt encrypted files
- Error with gist create HOT 4
- gist edit fails with ERROR[gist] handle_gist_edit() takes 2 positional arguments but 4 were given HOT 6
- Switch to using poetry
- Use `unittest.mock.auto_spec` in `test_cli_parser.py`
- Add unit tests to cover `client.py`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gist.