Why am I getting permission denied on my Travis CI build for rebar?

388 views Asked by At

I ran a build, on Travis CI and got a permission denied error:

$ source ${TRAVIS_HOME}/otp/23.0/activate 3.01s$ ./rebar get-deps /home/travis/.travis/functions: line 355: ./rebar: Permission denied The command "eval ./rebar get-deps " failed. Retrying, 2 of 3. /home/travis/.travis/functions: line 355: ./rebar: Permission denied The command "eval ./rebar get-deps " failed. Retrying, 3 of 3. /home/travis/.travis/functions: line 355: ./rebar: Permission denied The command "eval ./rebar get-deps " failed 3 times. The command "./rebar get-deps" failed and exited with 126 during . Your build has been stopped.

I don't understand why I am getting this error message. I used the .travis.yml from the nitrogen framework which my project uses as a base. As you can see my .travis.yml is the same. Can someone please explain why this is happening and how to fix it?

1

There are 1 answers

4
Chen Yu On

It seem the OS path write permission problem. It is related to eval ./rebar get-deps failed. You can debug the problem by running ./rebar get-deps by yourself and find which path the program want to use, then set the path permission correctly or may be the path already exists.

Or rm -Rf deps may be helpful.

It may be related to rebar application, use chmod 700 rebar to solve the problem.

The followings are .travis.yml and Makefile, it show it use local ./rebar file. you can change Makefile to global rebar file.

nitrogen/.travis.yml

language: erlang script: "make travis" otp_release:

  • 23.0
  • 22.0
  • 21.3 before_script: "sudo apt-get --yes --force-yes install libpam-runtime"

nitrogen/Makefile

REBAR:=./rebar

get-deps: $(REBAR) get-deps

update-deps: $(REBAR) update-deps

compile: $(REBAR) compile

I think you can branch your own nitrgeon repository, and use it then you can edit code as you like.

In addition, nitregon try to run the download program(rebar), your travis think this action is dangerous for running uncontrollable code as it will crash your server as virus.

Test the travis.ci in your pc then test it into production system.