Travis sudo is disabled

Chunliang Lyu picture Chunliang Lyu · Oct 10, 2014 · Viewed 9.4k times · Source

I want to use apt to install some packages for the test, however, it fails due to that the sudo is disabled. I found the following in the test output:

Sudo, the FireFox addon, setuid and setgid have been disabled.

It seems that the output comes from this line in travic-ci, but setting paranoid_mode to false in .travis.yml does not work.

How to enable sudo access?

PS: I am using private repo.

EDIT: The following .travis.yml will fail due to sudo: must be setuid root when running sudo apt-get update -qq

language: python
python:
  - "3.4"

before_install:
  - sudo apt-get update -qq

script:
  - nosetests

Setting sudo: true and/or paranoid_mode: false does not work.

Answer

Sven Fuchs picture Sven Fuchs · Oct 10, 2014

Sudo access is turned off on our Docker based architecture, which will be used in two contexts:

  • repositories opt in using sudo: false in their .travis.yml file (it additionally needs to be turned on on our side)
  • on our educational program (see http://education.travis-ci.com)

Builds running on our Docker based architecture currently cannot be allowed sudo access due to certain security concerns in the LXC/Docker layer. We hope this will be fixed in the near future, but unfortunately the issue is out of our own hands.

We are also working on improving the Firefox addon, which currently uses sudo itself, but shouldn't. We'll post on our blog once this has happened.