Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't figure out GitHub repo name when I use `travis encrypt-file`

when I use travis encrypt-file command,throw error:

Can't figure out GitHub repo name. Ensure you're in the repo directory, or specify the repo name via the -r option (e.g. travis <command> -r <owner>/<repo>)

How do I use travis command to specify the repo name? I don't find on travis's docs

like image 632
gatinul Avatar asked Oct 21 '25 05:10

gatinul


2 Answers

A similar but more complete message can be seen in lib/travis/cli/repo_command.rb

Can't figure out GitHub repo name. 
Ensure you're in the repo directory, or specify the repo name via the -r option (e.g. `travis <command> -r <owner>/<repo>`)"
GitHub repo name is invalid, it should be on the form 'owner/repo'

So in your case:

travis encrypt-file -r <owner>/<repo>

Or:

cd /path/to/GitHub/cloned/repo/locally
travis encrypt-file 

(because in the last case, git remote -v shows the github remote repo url)

Speaking of remote, J0hnG4lt mentions in the comments:

Caused for me by having a non standard remote name.
Travis expects the remote to be called "origin".

like image 61
VonC Avatar answered Oct 23 '25 20:10

VonC


A similar but more complete message can be seen in lib/travis/cli/repo_command.rb

Can't figure out GitHub repo name. 
Ensure you're in the repo directory, or specify the repo name via the -r option (e.g. `travis <command> -r <owner>/<repo>`)"
GitHub repo name is invalid, it should be on the form 'owner/repo'

So in your case:

travis encrypt-file -r <owner>/<repo>

Or:

cd /path/to/GitHub/cloned/repo/locally
travis encrypt-file 

(because in the last case, git remote -v shows the github remote repo url)

Speaking of remote, J0hnG4lt mentions in the comments:

Caused for me by having a non standard remote name.
Travis expects the remote to be called "origin".

like image 20
VonC Avatar answered Oct 23 '25 22:10

VonC