Failed: Protected Repository Attempting to Build Turris 4.x

Issue: fatal: Authentication failed for ‘https:// gitlab .labs .nic .cz/ turris/ foris .git/’

OS: Ubuntu 14.04.1 running under VirtualBox (Windows 10 pro)

Packages installed:
sudo apt install subversion g++ zlib1g-dev build-essential git python python3
sudo apt install libncurses5-dev gawk gettext unzip file libssl-dev wget
sudo apt install libelf-dev ecj fastjar java-propose-classpath
sudo apt install build-essential libncursesw5-dev python unzip libc6-dev
sudo apt install python3-distutils
sudo apt install fakeroot gdb
sudo apt install libdevel-trace-perl
sudo apt install curl
sudo apt install openjdk-11-jre-headless
sudo apt install libssh2-1
sudo apt-get install gcc-multilib
sudo apt-get install cmake

Build Procedure:

mkdir ~/turris
cd ~/turris
git clone https://gitlab.labs.nic.cz/turris/turris-build.git
cd ~/turris/turris-build
git checkout $(git tag | sort | tail -1)
./compile_pkgs -j2 -a V=s -s /home/casey/signcert/server.key -t omnia


Checking out files from the git repository…
Cloning into ‘foris’…
fatal: Authentication failed for ‘https://gitlab.labs.nic.cz/turris/foris.git/
make[2]: *** [/home/casey/turris/turris-build/build/dl/foris-package-v100.3.tar.gz] Error 128
make[2]: Leaving directory /home/casey/turris/turris-build/build/feeds/turrispackages/cznic/foris/foris' time: package/feeds/turrispackages/foris/python3/compile#0.04#0.00#1.31 ERROR: package/feeds/turrispackages/foris failed to build (build variant: python3). make[2]: Entering directory/home/casey/turris/turris-build/build/feeds/turrispackages/cznic/foris/foris’

It appears that the respository is protected?

What do I need to do to move past this?

I believe it should be Turris / Foris / foris · GitLab

Your system WOULD NOT let me put 3 URLs in the text of the message. So, I added spaces to get the bug filed. If you look below, you see that the error message occurred on exactly the URL you indicated…

I’m sorry; I can’t see that. My URL has “foris” twice and certainly is publicly accessible.

Got it.
The URL is embedded in the scripts that are part of the repository.
How do I change them?

The Discourse forums are a bit restrictive for new users to reduce spam. Unfortunately it occasionally hits good posts as well.

The file which contains the definition is:

turris-build/build/feeds/turrispackages/cznic/foris/foris/Makefile
Line 15: PKG_SOURCE_URL:=https://gitlab.labs.nic.cz/turris/foris.git

1 Like

The Makefile is downloaded from somewhere into the build/feeds subdirectory… It is NOT part of the initial respository clone.

This seems that you are trying to build old version of Turris OS. Just checkout some newer version first. It looks like pre 4.0.2 versions as we moved some repositories as part of internal cleanup around and updated URLs in packages.

This is the sequence of events that I went through

mkdir ~/turris
cd ~/turris
git clone https://gitlab.labs.nic.cz/turris/turris-build.git
cd ~/turris/turris-build
git checkout $(git tag | sort | tail -1)
./compile_pkgs -j2 -a V=s -s /home/casey/signcert/server.key -t omnia

According to the log, it would appear that git checkout picked up version 4.14.137

Note: checking out ‘89808e211cd5ef5989bd0becb8cd45f9340610ff’.

You are in ‘detached HEAD’ state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

git checkout -b new_branch_name

HEAD is now at 89808e2… kernel: bump 4.14 to 4.14.137

Is there another specific version I should be checking out?

Ok I think that the problem is in $(git tag | sort | tail -1). Can you please tell me what distribution are you running and also post output of git tag | sort? And also git tag | sort -V?

Edit: anyway that commit in OpenWrt is more than year old so there is something wrong with your checkout for sure.

With this I noticed that we should suggest probably sort -V instead of plain sort. (https://gitlab.labs.nic.cz/turris/turris-build/merge_requests/111)

1 Like

For me v4.0-beta9 wins which probably isn’t what you want. Well, who says that sort just sorts versions the way you expect (by default)? EDIT: with sort -V it gets 4.0.5, i.e. the “right” answer.

Output:

v4.0-beta1
v4.0-beta10
v4.0-beta2
v4.0-beta3
v4.0-beta4
v4.0-beta5
v4.0-beta6
v4.0-beta7
v4.0-beta8
v4.0-beta9

Appears to select the v4.0-beta9

I will start over and try specifically checking out v4.0.5. Will let you know tomorrow what happens.

Here is the output of “git tag | sort -V”
v4.0-alpha1
v4.0-alpha2
v4.0-alpha3
v4.0-alpha4
v4.0-alpha5
v4.0-beta1
v4.0-beta2
v4.0-beta3
v4.0-beta4
v4.0-beta5
v4.0-beta6
v4.0-beta7
v4.0-beta8
v4.0-beta9
v4.0-beta10
v4.0.0
v4.0.1
v4.0.2
v4.0.3
v4.0.5

Thank you for confirmation that using sort -V fixes that. Hoping for good results with your build.