Installation

Webwork2.16 Update to 2.17 (unable to access git)

Webwork2.16 Update to 2.17 (unable to access git)

by Vivien Altwasser -
Number of replies: 5

I wanted to update 2.16 to 2.17 with the installation manual for that purpose. The problem is I only got to the command git fetch origin which resultet in a timeout error obviously due to security changes on git as proposed by two forum topics by Larry Riddle and Murray Eisenberg.

Following the instructions in those posts I got a new error with git fetch origin: fatal: unable to access 'https://github.com/openwebwork/webwork2.git/': Operation timed out after 300011 milliseconds with 0 out of 0 bytes received

A third topic implies that maybe keys are necessary to do the trick. But I am not able to follow those hints as those point at the general installation of 2.16. I have no idea to tackle the time out.

In reply to Vivien Altwasser

Re: Webwork2.16 Update to 2.17 (unable to access git)

by Danny Glin -

It looks like you have a slash at the end of the git URL, which could be what is causing it to not connect.  If you remove that slash I would expect it to fix the connection error.

Note that now that WeBWorK 2.18 has been released, you will have to modify the installation instructions slightly in order to upgrade to a previous version.  Where it says 'git checkout main' you should use 'git checkout WeBWorK-2.17+', otherwise it will try to switch you to the most recent version (i.e. 2.18).

In reply to Danny Glin

Re: Webwork2.16 Update to 2.17 (unable to access git)

by Vivien Altwasser -

When I run the command 

git remote -v

I get the url without that slash. 

origin  https://github.com/openwebwork/webwork2.git (fetch)                                                                                                                 origin  https://github.com/openwebwork/webwork2.git (push)

I set that by

git remote set-url origin https://github.com/openwebwork/webwork2.git

I do not know where to find the file to recheck spelling.

In reply to Vivien Altwasser

Re: Webwork2.16 Update to 2.17 (unable to access git)

by Danny Glin -
That looks right for the remotes. Based on the message it could be a connectivity issue. You can try a couple of things to confirm whether your server is able to connect to GitHub:
  1. Try the command "curl https://github.com/openwebwork/webwork2.git".  If this times out it's a good indication that there's an issue with your server connecting to GitHub.
  2. You can try cloning the webwork2 repository again somewhere else on your server (e.g. "cd /tmp" followed by "git clone https://github.com/openwebwork/webwork2.git"). If this works then it proves that you can connect to GitHub, so we're back to there likely being an issue with the configuration.
In reply to Danny Glin

Re: Webwork2.16 Update to 2.17 (unable to access git)

by Vivien Altwasser -

Many thanks, this advice helped to convince higher IT to adapt the Firewall appropriately. I could do 

git fetch origin

then and

git checkout WeBWorK-2.17+

I had to mv some files before that worked.

But then

git pull

is not working giving the message:

You are not currently on a branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.

    git pull <remote> <branch>

I thought maybe I could adapt like in your first answer (git pull WeBWorK-2.17+) but that does not seem to make sense.

In reply to Vivien Altwasser

Re: Webwork2.16 Update to 2.17 (unable to access git)

by Glenn Rice -

Running "git checkout WeBWorK-2.17+" leaves you in a detached state.  You can't pull once you do that.  Run "git checkout -b WeBWorK-2.17+ WeBWorK-2.17+" to check out the WeBWorK-2.17+ tag to the local branch that is also named WeBWorK-2.17+.  You won't need to pull because it will already be up to date.  However, pull will work, it will just tell you your branch is up to date.