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
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".
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".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With