From cf6e9be536e9b324accc92957ec7aa451a8e0c1f Mon Sep 17 00:00:00 2001 From: Dan Bernier Date: Thu, 19 Oct 2023 14:35:30 -0400 Subject: [PATCH] Drop refs to `create_authorization` from README These should've come out in 017b0e3bc4aafed817142db3765d02e88d926228. Fixes #1639 --- README.md | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/README.md b/README.md index 3636c5ecf..34d83d8c2 100644 --- a/README.md +++ b/README.md @@ -213,15 +213,7 @@ user.login # => "defunkt" ``` -You can [create access tokens through your GitHub Account Settings](https://help.github.com/articles/creating-an-access-token-for-command-line-use) -or with a basic authenticated Octokit client: - -```ruby -client = Octokit::Client.new(:login => 'defunkt', :password => 'c0d3b4ssssss!') - -client.create_authorization(:scopes => ["user"], :note => "Name of token") -# => -``` +You can [create access tokens through your GitHub Account Settings](https://help.github.com/articles/creating-an-access-token-for-command-line-use). ### Two-Factor Authentication @@ -237,18 +229,6 @@ client = Octokit::Client.new \ user = client.user("defunkt", :headers => { "X-GitHub-OTP" => "" }) ``` -As you can imagine, this gets annoying quickly since two-factor auth tokens are very short lived. So it is recommended to create an oauth token for the user to communicate with the API: - -```ruby -client = Octokit::Client.new \ - :login => 'defunkt', - :password => 'c0d3b4ssssss!' - -client.create_authorization(:scopes => ["user"], :note => "Name of token", - :headers => { "X-GitHub-OTP" => "" }) -# => -``` - ### Using a .netrc file Octokit supports reading credentials from a netrc file (defaulting to