No access to private github repositories from debug mode


#1

I have a problem with ssh connection to my private repos on github using debug mode. During normal run there is no problem. When I switch to debug mode there is ‘Permission denied’. I think ssh should be setup by default. Am I right?

In before_install section I have pip command installing package directly from github:

before_install:
  - pip install --user git+https://github.com...

When I use travis_run_before_install command connection to travis machine is broken instantly, after pip command fails, and debug job is finished - failed. No chance to reconnect to machine. Is it desired behaviour, when command fails in that section?

I use go image 1.11.x


#2

Do you mean this?
https://docs.travis-ci.com/user/running-build-in-debug-mode/#permission-denied-error-message


#3

No. I can connect through ssh to travis machine, but when I want access private github repository from travis machine using ssh there is no accesss to it


#4

Ah, I understand what you are asking now. My apologies.

During the debug build, we remove the GitHub credentials we use to clone private repositories for security reasons. So, if you need to clone private repositories, you will have to set it up again.


#5

Ok, thanks for clarification. According to second part, Is it ok that ssh connection is broken after travis_run_before_install is not successful?


#6

Yes. Commands in before_install are expected to succeed; if it fails, the build terminates immediately; e.g., https://travis-ci.org/BanzaiMan/travis_production_test/builds/490603898#L439

The ssh session would have shown the message to this effect, but the session closure probably left you with nothing on your terminal.

$ ssh RMcxxm6GUTEe0w3SdTZuSAAie@to2.tmate.io
[server exited]
Connection to to2.tmate.io closed by remote host.
Connection to to2.tmate.io closed.

#7

Well, we could argue that this (terminating the debug connection when a command fails at certain places) is not desirable. That’s probably a different topic.


#8

Thanks again. It is not a big problem for me as it is right now