How to access proxy settings in terminal

I want to use git in the terminal, but unfortunately I'm sometimes (but not always) behind a firewall that requires me to use a proxy server.
I've successfully set up environments for all these locations, including the proxy settings that are relevant in each context, but I'm unable to access them in the terminal (i.e. there's no HTTP_PROXY environment variable). My idea is to 'inherit' the system wide proxy settings in the terminal and use them to configure git.
Is there any way to access the proxy settings in the terminal.

In you home directory, create a file called .bash_profile (notice the leading dot)
nano .bash_profile
add to that file
export HTTP_PROXY="http://your.proxy.information:nnn"
Save the file
Restart the Terminal session.
Command line Git should work via the environment variable you just created.
NOTE: you will need to use
ls -a
to see the .bash_profile in a Terminal session, and because the leading dot makes it an invisible file, the Finder will not show it without some magic Finder Foo

Similar Messages

  • How to use proxy settings for one website

    Hello,
    I have to access the only one website using Proxy settings and for others I don't need proxy to access. Is there a way to configure the internet settings to allow one website using Proxy... Please advise. Thanks!
    Regards,
    Aravin S

    I am also getting this "error".  The printer (8500 A910) connected to the web well enough that it went out and supposedly downloaded a new update, but then it was supposed to print a page showing the email address, but did not.
    So I go in and try to set up the eprint, and it tells me it cannot connect to the sever and I'll need to enter a proxy address and port number.  But my ISP's cable modems do NOT have any static IP address nor do they provide any sort of proxy service.  Everything works just fine with "automatic discovery" (DHCP) for every computer in the house.  No problems there.
    So, since  that's the case, of course I cannot look up some proxy address and port number in my web browser because they're all set up for "automatically detect settings".
    What's baffling is that the printer connected to something at HP to download the "update", and it went through a process that appeared to be what I'd expect it to do if it was updating its firmware.  But it won't connect to whatever it's supposed to connect to to have an email address assigned.
    Does HP supply a proxy server?  If so, what's its IP address or URL, and what port should a person set the printer to try to use?
    UPDATE:
    It appears that the HP site must have just been "down" for about six or seven hours while I was trying to get the printer to connect because it now connected and I got an email address asigned without needing to have any "proxy" stuff set up at all.  It's a shame that the printer does not simply report "HP Site down - try again later" instead of reporting that you need to use a proxy when that's impossible.
    "Now, on to the next problem which is that my emails to the assigned address are all bouncing with a "550 5.7.1 Command rejected" error!

  • How to make proxy settings in solaris 10 i386

    Dear Sir,
    I need your help in making proxy settings in solaris 10 x86, as well as on SPARC.
    i installed on virtual machine, and later i wanted to do the same on M4000 server. please help.
    Why I need to set proxy?
    I am on a co-orporate network, and it requires proxy to use internet to download packages for sun directly from sun machine.
    What package I want to download?
    I want to dowload CUPS to configure LINE PRINTER(ALIS5180).
    What did i do to configure line printer?
    1, i installed sun solaris 10 on a dell server to make it as a "print server"
    2, with the print manager I configure "alis5180"
    3, give the print command to test the printing.
    4, I did not got success, coz it is not printing the document i want, it is printing junk.
    5, i clear the cache of alis5180 printer.
    6, reset all the emulations ANSI, IBM Proprinter III XL, Epson FX-1180, Printronix® P600 & P 5000/6000, DEC® LG01, HP 2564C, Tally line/dot matrix printer, Epson FX 1180,
    MTPL, contextual arabic, Twinax (IBM 4234/4210/5225)/Coax(IBM4234), HP LineJet HPLP Series, HP 256X no success.
    Conclusion:-
    This is why I want to configure cups. and I need internet access on the print server to download the this package, and it require internet connection.
    Regards,
    Mky
    Edited by: user9007339 on Jan 22, 2012 3:29 AM

    You could try the Dell site, but I doublt if they will have a driver for Solaris, Linux maybe but not Solaris. Otherwise try the DriverGuide web site. http://www.driverguide.com/
    You could also try installing OpenSolaris if you don't specifically need Solaris 10. Better chance that OpenSolaris will support the NIC.

  • Accessing Proxy Settings

    Hi,
    I am trying to access user's proxy settings in my signed JApplet, but can't find any information about that in documentation. Can someone point me somewhere? I need them because I use Sockets in my program.
    Thank you,
    Dmitri

    Detecting proxy settings that the plug-in is using is tricky stuff... Sun added some (not well documented) support for proxy detection... Try searching the jdc bug db for detect proxy, etc.
    The extra jar that needs to be in your classpath during compile (if compiling under 1.3.1) is jre 1.4.1's rt.jar. BTW, we also include javaws.jar because our same JAppplet JARs run under Java Web Start.
    I've clobbered together a method (that could use some cleaning:) that takes the URL of a file known to exist (anything from the applet's codebase, eg. settings.prop) & sets a couple booleans & proxy props... Seems to work pretty well except under Mac OS X:
    static String proxyIP = "";
    static int proxyPort = 80;
    static boolean autoDetectProxy = false;  // If SSL version, assume autoDetect, else do not
    static boolean useProxy = false;
    detectProxy(<codebase file url>);
    System.out.println ("Using Proxy:" + useProxy + " Auto Detect Proxy:" + autoDetectProxy + "Proxy IP:" + proxyIP + " Proxy Port:" + proxyPort);
    void detectProxy(URL sampleURL) {
        // Added in 5.0.3 -  Plugin 1.4 will hide the internal Sun proxy stuff, so use new proxy property introduced in 1.3.0_1 (1.3.1)...
        // 5.0.7 Update: - Plugin 1.4 Final added com.sun.java.browser.net.* classes ProxyInfo & ProxyService... Use those with JREs => 1.4
        System.out.println(("About to attempt auto proxy detection under Java version:"+javaVers);
        boolean invokeFailover = false; // If specific, known detection methods fail may try fallback detection method
        if (javaVers.startsWith("1.3"))  {    //  Use Sun-specific internal plugin proxy classes for 1.3.X... 1.4.+ nuked this method...
            //  Look around for the 1.3.X plugin proxy detection class... Without it, cannot autodetect...
            try {
                Class t = Class.forName("sun.plugin.protocol.ProxyHandler");
                // Attempt to discover proxy info by asking internal plugin code to locate path to server sampleURL...
                sun.plugin.protocol.ProxyHandler proxyHandler = sun.plugin.protocol.PluginProxyHandler.getDefaultProxyHandler();
                if (proxyHandler != null) {
                    try {
                        sun.plugin.protocol.ProxyInfo proxyInfo = proxyHandler.getProxyInfo (sampleURL);
                        if (proxyInfo != null) {
                            // Currently support HTTP non-authenticating proxies.  Authenticating proxies/SOCKS support TDB
                            /* Authenticating proxies need (actually, will need to use Header param of SSLTunneledSocket):
                                String authString = "userid:password";
                                String auth = "BASIC + new sun.misc.BASE64Encoder().encode(authString.getBytes());
                                URL theURL = ....
                                URLConnection urlConn = ....
                                urlConn.setRequestProperty("Proxy-Authorization", auth);
                            useProxy = (proxyInfo.getProxy() != null);
                            if (useProxy) {
                                proxyIP = proxyInfo.getProxy();
                                proxyPort = proxyInfo.getPort();
                                System.out.println("1.3.X proxy " + proxyIP+" port " + proxyPort);
                        else {
                            System.out.println("NULL proxyInfo in 1.3.X auto proxy detection, assuming no proxy...");
                            autoDetectProxy = false;
                    catch (Exception e) {
                        System.out.println("Exception during 1.3.X auto proxy detection, will try failover detection, e:"+e);
                        invokeFailover = true;
            catch (Exception ee) {
                System.out.println("Sun Plugin 1.3.X proxy detection class not found, will try failover detection, e:"+ee);
                invokeFailover = true;
        else if (javaVers.startsWith("1.4"))  {
            try {
                //  Look around for the 1.4.X plugin proxy detection class... Without it, cannot autodetect...
                Class t = Class.forName("com.sun.java.browser.net.ProxyService");
                com.sun.java.browser.net.ProxyInfo[] pi = com.sun.java.browser.net.ProxyService.getProxyInfo(sampleURL);
                if (pi == null || pi.length == 0) {
                    System.out.println("1.4.X reported NULL proxy (no proxy assumed)");
                    useProxy = false;
                else {
                    System.out.println("1.4.X Proxy info geProxy:"+pi[0].getHost()+ " get Port:"+pi[0].getPort()+" isSocks:"+pi[0].isSocks());
                    useProxy = true;
                    proxyIP = pi[0].getHost();
                    proxyPort = pi[0].getPort();
                    System.out.println("proxy " + proxyIP+" port " + proxyPort);
            catch (Exception ee) {
                System.out.println("Sun Plugin 1.4.X proxy detection class not found, will try failover detection, e:"+ee);
                invokeFailover = true;
        else {
            System.out.println("Sun Plugin reported java version not 1.3.X or 1.4.X, trying failover detection...");
            invokeFailover = true;
        if (invokeFailover) {
            System.out.println("Using failover proxy detection...");
             try {
                String proxyList = ((String)System.getProperties().getProperty("javaplugin.proxy.config.list")).toUpperCase();
                System.out.println("Plugin Proxy Config List Property:"+proxyList);
                useProxy = (proxyList != null);
                if (useProxy) {     //  Using HTTP proxy as proxy for HTTP proxy tunnelled SSL socket (should be listed FIRST)....
                    // 6.0.0 1/14/03 1.3.1_06 appears to omit HTTP portion of reported proxy list... Mod to accomodate this...
                    // Expecting proxyList of "HTTP=XXX.XXX.XXX.XXX:Port" OR "XXX.XXX.XXX.XXX:Port" & assuming HTTP...
                    if (proxyList.indexOf("HTTP=") > -1)
                         proxyIP = proxyList.substring(proxyList.indexOf("HTTP=")+5, proxyList.indexOf(":"));
                    else proxyIP = proxyList.substring(0, proxyList.indexOf(":"));
                    int endOfPort = proxyList.indexOf(",");
                    if (endOfPort < 1) endOfPort = proxyList.length();
                    proxyPort = Integer.parseInt(proxyList.substring(proxyList.indexOf(":")+1,endOfPort));
                    System.out.println("proxy " + proxyIP+" port " + proxyPort);
            catch (Exception e) {
                System.out.println("Exception during failover auto proxy detection, autoDetect disabled, e:"+e);
                autoDetectProxy = false;
    }Good luck,
    Chris

  • How to use proxy settings to join a Remote Server ?

    I have a problem to configure a Remote Server : my portal is behind a proxy, to access to the remote server, I have to make some proxy settings. I've tried to use -Dhttp.proxyHost and -Dhttp.proxyPort but they have no effect
    It seems like that the portal ignore completely my proxy settings
    Any idea to resolve this ?
    Thanks

    I've resolved it : proxy settings can be modified in <PT_HOME>/settings/common/serverconfig.xml
    It was not easy to find it, there's no doc talking about this

  • Airport Express - How to set proxy settings?

    Hello all
    I have an AirPort Express in for testing at work.
    The internet access at work requires going through a proxy. This proxy gets set on domain clients via gpo.
    We have some devices we dont want to put on the domain (wont get the gpo) but we need them to have internet access.
    We could set the proxy on these devices manauly but theres a lot of them.
    I have been trying to find where in the Airports settings you can set proxy settings but cant find anything.
    Can you set proxy settings manualy in the device and if so, where abouts?
    I'm using windows for accessing the Airports settings.
    Thanks for any help someone can offer.

    unfortunately i have to use 1.4 which makes this a bit more tricky.
    my other idea was to use system.setProperties to set the 2 proxy fields and then afterwards set them back to what they were -- however in the case they were null I get an NPE when I try and set them back, so I'd need a workaround for that as well.

  • How to disable proxy settings from ipad

    hi i am using airtel india  sim for acessing internet from ipad mini. but my memberships in some accounts has been suspended saying that due to proxy use. but i  did not use any proxy settings n i m using internet via airtel internet. in this regard, i wnt to remove the proxy settings from my device. can any one help me on advising where to find the proxy settings and how to disable them? plz...............

    Proxy settings on the iPad relate only to WiFi (Settings > WiFi). It's possible your mobile operator is using a Proxy. You should talk to them to see if that's the case.

  • How to check proxy settings for android

    Hi...when i try to go to youtube in mozilla android, it won't go at all and gives me a message to check my proxy settings...I tried as I may ...could not find or know what proxy to change...see no network options like my "Windows computers"...which I have set for "no proxy" ...pity...I added a lot of cool features to firefox and can't go to youtube and some other sites too.*john

    Hey John,
    I am sorry to hear that on mobile the Firefox for Android is asking to check the proxy. Does this happen on multiple networks?
    If there is a proxy it should be listed in about:networking. Plug that into your url and see if there is a proxy listed.
    There is also a nifty add on [https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=2&ved=0CCYQFjAB&url=https%3A%2F%2Faddons.mozilla.org%2Fen-US%2Fmobile%2Faddon%2Fproxy-mobile%2F&ei=0n5JVM_AJtCmyATo34KICg&usg=AFQjCNEiZyw3XPMF0dUWJN36Lv5rJnKtKg&bvm=bv.77880786,d.aWw Mobile Proxy] that might be able to list them.

  • How to access BIOS settings in Bootcamp Windows 7?

    I need to reset the BIOS boot order in my Bootcamp partition to boot first from a DVD/CD, such as a Windows 7 repair disk.  What are the steps to get there?

    There is no BIOS, so you can't access the settings.

  • How to use Proxy Settings in swf?

    Hi ,
        I am using swf inside an MFC application. Both MFC applciation and swf can call web pages(some web services). Everything was working fine until my company added a proxy server. I have made changes to the MFC application and that can communicate through proxy server but swf is still not able to call remote services.
    Where should I make changes in swf to call remote service through proxy? I just want to know which class or property should I use? There should be some propety to specify that I want to make a request through Proxy server on some port with a username and password.
    - Rahul

    I've resolved it : proxy settings can be modified in <PT_HOME>/settings/common/serverconfig.xml
    It was not easy to find it, there's no doc talking about this

  • How to edit proxy settings of available WLAN????

    i OWN NOKIA C-3 AND FACING PROBLEM IN USING WIFI AT MY UNIVERSITY. IT SEARCHES AVAILABLE NETWORKS AND GETS CONNECTED BUT WHEN I TRY TO BROWSE THERE APPEARS AN ERROR THAT "SERVICE NOT AVAILABLE" ITS BECOZE THE PROXY SETTINGS IT PICKS UP AUTOMATICALLY ARE MAY B INCOMPLETE OR INCORRECT AND I DIDNT FOUND ANY OPTION TO EDIT ITS SETTINGS EPECIALLY PROXY SETTINGS. FEW OF MY FRIENDS ARE USING SOME OLDER MODELS OF NOKIA AND THEY HAVE EDITING OPTIONS OF PROXY ADDRESS ETC OF NETWORK WHICH YOU ARE CONNECTED WITH BUT IN MY C-3 I JUST CAN VIEW THE SETTINGS PICKED UP AUTOMATICALLY BUT CANT EDIT SETTINGS
    CAN ANY BODY HELP ME TO TACKLE THIS PROBLEM? 

    unfortunately i have to use 1.4 which makes this a bit more tricky.
    my other idea was to use system.setProperties to set the 2 proxy fields and then afterwards set them back to what they were -- however in the case they were null I get an NPE when I try and set them back, so I'd need a workaround for that as well.

  • How to change proxy settings on my firefox 4 beta for android

    I cannot see any proxy settings button in preferences section

    To set a proxy server in Firefox 4 beta for Android:
    # Type "about:config" in the address bar and press return.
    # Type "proxy.http" into the search box on the about:config page.
    # Tap on "network.proxy.http" and type the server name into the text box.
    # Tap on "network.proxy.http_port" and type the port number into the number box.

  • How to access DNS settings - AirportUtility ver. 6.2

    My Airport Utility ver. 6.2 appears corrupted & my Airport Extreme Setup Guide has no relevant instructions for accessing & editing  DNS addresses.
    My primary Mac X 10.7.5 and backup Win7 computers are fully functional but both produce 'page not found' and 'server timeouts/not located' browser errors for two specific URLs.  I am told that my OS or hardware is at fault - but as yet cannot confirm what precisely is at fault.  I have added DNS addresses to my Mac with the same results.
    URLs at Issue:
    www.mindmixer.com
    www.activate-wichita.com
    I suspect I need to access the DNS settings for both my Airport Extreme and my cable modem (Motorola Model NVG510).
    Please advise &/or comment  -  Thanks

    Hmm. I managed to get it work for me. By the way, that's my site, it's just pretty old now. I need to fix the downloads and I guess I need to update that article
    I edited the file in TextWrangler, and at some point it changed the permissions on the file to ME, which caused it not to ask me for authentication any longer. But it definitely CAN work. I managed to get all of the frames to show in my Copy of Keynote 6.
    Edit: Wow, I haven't posted here in 5 years.

  • Anyone know how to access 'APN Settings' ?

    Can anyone tell me the steps to locating the APN Settings that I was told should be in the Advanced Options menu- but isn't there?  I've got a BB Curve 8530 and need to make sure the TCIP selection is correct.  Gotta be there somewhere- but I can't find it!  Thanks!  Aidan

    Hello,
    This KB documents where to find the APN settings. Note carefully that if a theme is running, many things (including this) could be somewhere else...and the theme is in control of that, so there's no way to diagnose it. Falling back to the default theme should allow the KB to point in the correct direction.
    Cheers!
    Occam's Razor nearly always applies when troubleshooting technology issues!
    If anyone has been helpful to you, please show your appreciation by clicking the button inside of their post. Please click here and read, along with the threads to which it links, for helpful information to guide you as you proceed. I always recommend that you treat your BlackBerry like any other computing device, including using a regular backup schedule...click here for an article with instructions.
    Join our BBM Channels
    BSCF General Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • How to Change proxy settings/homepage for all users in my system at a time?

    Need single configuration file for all users

    You can set up a system cache for sharing jars: See here: http://java.sun.com/j2se/1.5.0/docs/guide/javaws/developersguide/enterprise_config.03.06.html

Maybe you are looking for

  • License expired but only to Adobe Acrobat Pro 9 in my Creative Suite 4 Design Premium. How to settle this?

    I'd install and reinstall my CS4 in about 4 pcs and today when i open up the adobe acrobat i received message stating my license had expired. Even when i insert the license key from the CS4 Design premium box, still it stated as expired. What should

  • Open KM Navigation Content in Portal Content area

    Folks, We have a km navigation iview and want to open the contents in the portal content area instead of opening the links in a new window. I don't find any configurable options. What are the development effort options and how big is the effort? Any

  • Business Process Documentation

    Dear All Business Process Documentation I just want to know foloowing thing sabout Business Process Documentation. do yuo know where there any documents about Business Process Documentation and system log ? Edited by: Koji Watanabe on Feb 16, 2012 1:

  • Error in Split valuation

    Hi guys i encountered a error during the process of split valuation i have created valuation category and two valuation types have done it with activation and save. when i create a material with mmo2 in accounting 1 tab when i select organization lev

  • SQL 2014 RTM and Sql 2008r2 standard side by side installation ..

    We are planning on reconfiguring our database server and then installing SQL 2008 R2 Standard edition in a side by side installation with SQL 2014 RTM. I have researched a little, and have not seen any major issues when planning this type of configur