You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+4-35
Original file line number
Diff line number
Diff line change
@@ -233,22 +233,11 @@ default API endpoint dropped (was https://api.travis-ci.com/)
233
233
The `login` command will, well, log you in. That way, all subsequent commands that run against the same endpoint will be authenticated.
234
234
235
235
```console
236
-
$ travis login
237
-
We need your GitHub login to identify you.
238
-
This information will not be sent to Travis CI, only to GitHub.
239
-
The password will not be displayed.
240
-
241
-
Try running with --github-token or --auto if you don't want to enter your password anyway.
242
-
243
-
Username: rkh
244
-
Password: *******************
245
-
246
-
Successfully logged in!
236
+
$ travis login --pro --github-token ghp_********
237
+
Successfully logged in as rkh!
247
238
```
248
239
249
-
As you can see above, it will ask you for your GitHub user name and password, but not send these to Travis CI. Instead, it will use them to create a GitHub API token, show the token to Travis, which then on its own checks if you really are who you say you are, and gives you an access token for the Travis API in return. The client will then delete the GitHub token again, just to be sure. But don't worry, all that happens under the hood and fully automatic.
250
-
251
-
If you don't want it to send your credentials to GitHub, you can create a GitHub token on your own and supply it via `--github-token`. In that case, the client will not delete the GitHub token (as it can't, it needs your password to do this). Travis CI will not store the token, though - after all, it already should have a valid token for you in the database.
240
+
You need to use a GitHub token and supply it via `--github-token`. Travis CI will not store the token, though - after all, it already should have a valid token for you in the database.
252
241
*NOTE*: When creating a GitHub token, see [GitHub Permissions used by travis-ci.com](https://docs.travis-ci.com/user/github-oauth-scopes/#travis-ci-for-private-projects) or [GitHub Permissions used by travis-ci.org](https://docs.travis-ci.com/user/github-oauth-scopes/#travis-ci-for-open-source-projects). The token permissions are dependent on use of travis-ci.com or travis-ci.org and not if they are public or private repositories.
253
242
254
243
A third option is for the really lazy: `--auto`. In this mode the client will try to find a GitHub token for you and just use that. This will only work if you have a [global GitHub token](https://help.github.com/articles/git-over-https-using-oauth-token) stored in your [.netrc](http://blogdown.io/c4d42f87-80dd-45d5-8927-4299cbdf261c/posts/574baa68-f663-4dcf-88b9-9d41310baf2f). If you haven't heard of this, it's worth looking into in general. Again: Travis CI will not store that token.
There is also `travis/auto_login`, which will try to read the CLI configuration or .netrc for a Travis CI or GitHub token to authenticate with automatically:
1584
1553
1585
1554
```ruby
@@ -2027,7 +1996,7 @@ See also [Note on Ubuntu](#ubuntu) below.
2027
1996
For Ruby 2.3.x, be sure to have a compatible version of `faraday` installed; e.g.,
2028
1997
2029
1998
$ gem install faraday -v 1.0.1
2030
-
1999
+
2031
2000
### Development Version
2032
2001
2033
2002
You can also install the development version via RubyGems:
0 commit comments