Travis file encryption for GitHub repo that has been renamed

I am trying to encrypt a file for use on Travis-CI, as I did before. However, at some point, the associated GitHub repository was renamed. I now suspect - but cannot confirm - that the renaming occurred after the last time I successfully added the encrypted file.

The affected file contains an OAuth2 token, which needs to be updated every few months, which is my current need. Without this, my tests will not run.

When I follow the instructions here , I can successfully log into Travis, see my repositories, etc., but I cannot encrypt the file for this REPO transaction. I successfully used this instruction when I created the encrypted file for the first time.

Here's what happens:

$ travis encrypt-file tests/testthat/googlesheets_token.rds repository not known to https://api.travis-ci.com/: jennybc/gspreadr 

This repository is https://github.com/jennybc/googlesheets , but was renamed a few months ago from gspread to googlesheets. At that time, it looked good. I cannot find any evidence of the old repo name on GitHub or my Travis account, so I cannot figure out how to get around this error. Where does Travis dig out this old information to suffocate?

+5
source share
2 answers

I found the answer in this thread . You need to look at .git/config and refresh the traffic.

 [travis] slug = jennybc/MAKE_SURE_THIS_REFLECTS_CURRENT_REPO_NAME 

Apparently, this is NOT automatically updated when renaming the GitHub repository.

+8
source

The funny thing is, I also renamed my repository, but the slug name seemed correct, and running travis init points me to the same name.

The only problem was that Travis renamed my name with all lowercase letters, and on GitHub my name consisted of two uppercase letters. So I renamed my name to an even value on GitHub, and then Travis found my repository, hooray!

0
source

All Articles