lykwydchykyn and koenn:
Thanks for that. I figured something might be wrong with my syntax...
As I mentioned in another post in this thread, I will (unfortunately) have to wait until Monday to try this. I really do appreciate the quick responses, though. The more information I'm armed with, the better. At least as I figure it, this way I will have a few different ways to try, and if for some reason they don't work, we can move on with troubleshooting more quickly.
Thanks again,
computer_freak_8
I'm just a geek...
Alright, I unset the http_proxy environmental variable and it still didn't work.
So, I would like to try and get the proxy going (as was my original goal) and then ditch the Sprint card efforts, since it won't always be there, anyways.
promodus:
Is there any way to use your code without entering the username and password?
I can put the following code into my /etc/bash.bashrc file...
...and type "proxy" (without quotes) in a terminal, and it will prompt me for my username and password. So, can I simply substitute ...$username:$password@... where your code shows ...username:password... and have it work correctly?Code:function proxy(){ echo -n "username:" read -e username echo -n "password:" read -es password export http_proxy="http://$username:$password@192.168.xx.xx:80/" export ftp_proxy="http://$username:$password@192.168.xx.xx:80/" echo -e "\nProxy environmental variables set." }
Also, I found this code somewhere (can't remember where) to put in /apt/apt.conf to setup the proxy:
Can I sub in "$username:$password@" directly before the "proxy.url.here" and have it work?Code:Acquire { Retries "0"; HTTP { Proxy "http://proxy.url.here:80"; }; };
Thanks in advance,
computer_freak_8
Last edited by computer_freak_8; October 13th, 2008 at 06:56 PM. Reason: Remove private information
I'm just a geek...
yes for both questions;
it's usually not considerd good practice to put passwords in scripts like that, but if you want it that way ..
/apt/apt.conf - probably /etc/apt/apt.conf; and I thought this was already meantioned somewhere in this thread ...
edit : OK, slightly different syntax
Last edited by koenn; October 13th, 2008 at 07:54 PM.
Yes, I meant /etc/apt/apt.conf, not /apt/apt.conf.
I tried several different things, including exporting the username and password to the respective variables, and I even tried taking out the whole "http://........:80/" and putting in "$http_proxy" instead; still no luck, same 401 error.
I know it is exporting because I checked it with "echo $http_proxy", "echo $username", et cetera.
I'm just a geek...
Don't know if this will help anyone to troubleshoot with me, but I noticed something interesting.
"wget http://us.archive.ubuntu.com/blocked/file/path/here.gz" gives a 407 error. However, I can easily download it from Firefox.
Any ideas as to why this is? Can I make my terminal appear (to the proxy) to be Firefox? If so, how do I do this?
Thanks in advance,
computer_freak_8
I'm just a geek...
Thanks for that, but I'm still confused then: I have configured the environmental variable "http_proxy" as well as "/etc/apt/apt.conf", and it still won't use a proxy - just like wget won't.
I mean, it makes sense for wget to be giving me errors (if it doesn't see "http_proxy"), but it doesn't make sense for apt-get to be giving me errors.
Yes, Firefox is configured to use a proxy. I had to go into "Edit" --> "Preferences" to make it that way. How do I get my CLI programs to use the proxy?
Now, it's obvious that my proxy doesn't block the packages; they go through just fine in Firefox. So it is something with the authentication. (I think.)
Is there some way to get the CLI programs - especially apt-get - to prompt me for my authentication as needed, like Firefox does? Maybe this would solve my problem...
I'm just a geek...
Bookmarks