Code Monkey home page Code Monkey logo

Comments (13)

kappa7194 avatar kappa7194 commented on July 20, 2024

Interestingly, when the installer clones Git's repository it uses the proxy: when using the mobile phone hotspot I forgot to remove the proxy configuration from Windows, and the clone failed because it couldn't contact the remote, after removing the proxy configuration from Windows the clone succeeded.

from git.

dscho avatar dscho commented on July 20, 2024

Okay, I have no way to reproduce, so I rely on you to figure out the solution (after all the net installer is a developers' preview).

Could you please keep the window open after pacman fails? You will find a file called setup-git-sdk.bat in the top-level Git SDK directory. This is the batch file that is executed to initialize the Git SDK.

Now, what I need to know is: what is the %ERRORLEVEL% if you change working directory in a new cmd window to the top-level Git SDK directory and then run usr\bin\pacman -Sy?

This is the first thing we need to find out, i.e. a method to figure out reliably that a proxy is required.

After that, we need to ask the user for a proxy, then set the environment variable http_proxy (make sure to use all lower-case). This assumes, of course, that pacman respects that variable (could you please find that out, too? It's just calling set http_proxy=... and then usr\bin\pacman -Sy).

Once that is all said and done, we should add an @IF NOT "%http_proxy%" == "" @ECHO "export http_proxy=%http_proxy%" >etc\profile.d\http-proxy.sh line near the end of the setup script.

from git.

dscho avatar dscho commented on July 20, 2024

After that, we need to ask the user for a proxy, then set the environment variable http_proxy (make sure to use all lower-case). This assumes, of course, that pacman respects that variable (could you please find that out, too? It's just calling set http_proxy=... and then usr\bin\pacman -Sy).

According to Pacman's documentation, this method should work: http://www.garron.me/en/go2linux/arch-linux-pacman-proxy.html

from git.

nalla avatar nalla commented on July 20, 2024

You have to set both proxy variables. http_proxy and https_proxy.

from git.

nalla avatar nalla commented on July 20, 2024

@dscho you do not need to export the %http[s]_proxy variables. They should be catched up from the windows environment seamlessly from pacman. At least that was the case for me. We may have to provide some install instructions for the net-installer?

BTW: I struggled with this as well and forgot to put in on the wiki. Sorry for that!

from git.

dscho avatar dscho commented on July 20, 2024

@nalla I think we should export those variables from a profile.d/ script. That way, the user has to type in the HTTP proxy only once, and subsequent Git SDK sessions will work, too.

I have to admit, though, that I would have expected all my hard work to be honored by more action on the bug reporter's part than with silence.

from git.

dscho avatar dscho commented on July 20, 2024

@kappa7194 hmm. I would have expected somewhat better communication from you. Hopefully I can at least interest you in running my attempt at fixing your problem: https://github.com/git-for-windows/build-extra/releases/download/issue-46/git-sdk-64-installer-issue-46.7z.exe

from git.

nalla avatar nalla commented on July 20, 2024

A profile.d script would indeed help future sessions. If I remember correctly I put these variables manually into the environment via control panel. That was the reason I needed no further script. Lets just ask the user then if he has proxy settings when running the setup script. Maybe print out the location of the created script too if he had a typo?

from git.

dscho avatar dscho commented on July 20, 2024

@nalla precisely: git-for-windows/build-extra@net-installer-proxy

from git.

kappa7194 avatar kappa7194 commented on July 20, 2024

You have to set both proxy variables. http_proxy and https_proxy.

Manually setting http_proxy in a console before invoking setup-git-sdk.bat worked. I had to set the variable with set and not setx (see http://superuser.com/questions/79612/setting-and-getting-windows-environment-variables-from-the-command-prompt) as the latter didn't work.

I have to admit, though, that I would have expected all my hard work to be honored by more action on the bug reporter's part than with silence.

@kappa7194 hmm. I would have expected somewhat better communication from you. Hopefully I can at least interest you in running my attempt at fixing your problem

Are you aware that there are other timezones than your own, and that others can have a life besides the internet? Moreover I can reproduce the issue only on the corporate network since I don't have a proxy server at home, and that means an eight hours a day window.

from git.

kappa7194 avatar kappa7194 commented on July 20, 2024

The setup still fails.

When the second console window opens, the one which clones and builds Git, at the beginning I get a couple of errors:

bash: /mingw64/bin/git: Bad address
bash: /mingw64/bin/git: Bad address
bash: /mingw64/bin/git: Bad address

Git's compilation however seems to complete successfully, as that console at the end returns to the prompt.

Then the setup gets stuck: the console where Git has been built return to the prompt and stays there waiting for input, and the original console where setup-git-sdk.bat has been launched seems to be waiting for the other one to complete.

If I close the second console (CTRL-D, logout, etc) the first one starts throwing tons of errors, I haven't been able to capture them all as they quickly filled the console buffer, they were mainly "command not found" errors.

What I've been able to intercept is:

mkdir: cannot change permissions of '/dev/shm': Permission denied
mkdir: cannot change permissions of '/dev/mqueue': Permission denied
'C:\\Windows\\System32\\drivers\\etc\\hosts' -> '/etc/hosts'
'C:\\Windows\\System32\\drivers\\etc\\protocol' -> '/etc/protocols'
'C:\\Windows\\System32\\drivers\\etc\\services' -> '/etc/services'
'C:\\Windows\\System32\\drivers\\etc\\networks' -> '/etc/networks'
bash: /mingw64/bin/create-shortcut.exe: Bad address

Trying to rerun the setup yielded to something worse:

bash: line 1:  5768 Aborted                 (core dumped) git clone -b master -c core.autocrlf=false https://github.com/git-for-windows/git

Is there a way to redirect the whole output of both console windows to a file while still showing it in the console? I've found cmd > file.txt 2 > &1 but this hides the output from the console leaving you unable to understan what's going on.

At the moment I'm deleting the directory where the setup lives to start with a clean copy, is there a way to avoid re-downloading the libraries every time while still trying in a pristine environment? Our sysadmins will start to get angry if I try too much times as we share the network connection with the production servers…

from git.

dscho avatar dscho commented on July 20, 2024

Are you aware that there are other timezones than your own, and that others can have a life besides the internet?

Got it.

from git.

dscho avatar dscho commented on July 20, 2024

git-for-windows/build-extra@9bc6dae

from git.

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.