Comments (10)
Can you try using master and see if the problem persists?
You should be able to do so by specifying octokit in your Gemfile
like so:
gem 'octokit', :git => 'git://github.com/pengwynn/octokit.git'
Then simply run bundle update octokit
.
from octokit.rb.
This proved to be difficult. I could not test in my usual rails environment, as oa-oauth depends on version of Faraday older than Octokit does, which caused a conflict. I tried Octokit in IRB (as opposed to rails console), and got the same error, even when I cloned the Octokit repo and built the gem from HEAD.
from octokit.rb.
That's for doing that. I'll dive deeper into this issue and let you know what I find.
from octokit.rb.
Cool, thanks.
from octokit.rb.
When you say you've authorized the client with a token, are you referring to an OAuth2 token or an API token (from https://github.com/account/admin)? If it's the latter, that method of authentication has been deprecated.
from octokit.rb.
I'm using the Oath2 authentication token obtained through OmniAuth on Rails.
from octokit.rb.
Can you show me the code you're using to setup the client?
from octokit.rb.
In rails, my OAuth callback:
def github
data = env["omniauth.auth"]
u = current_user
u.github_enabled = true
u.github_username = data["user_info"]["nickname"]
u.github_uid = data["uid"]
u.github_token = data["credentials"]["token"]
u.save!
end
To obtain a client:
Octokit::Client.new(login: github_username, token: github_token)
from octokit.rb.
Try this instead:
Octokit::Client.new(login: github_username, oauth_token: github_token)
That should solve the problem.
from octokit.rb.
Works perfectly, thanks!
from octokit.rb.
Related Issues (20)
- [BUG]: `check_runs_for_check_suite` generates invalid path if a repo string is passed in HOT 1
- Karatbars
- [FEAT]: Add support for SARIF data upload
- [MAINT]: Extend TooManyRequests test to check that the error message still differentiates between primary & secondary rate limits.
- [FEAT]: Support for codespaces and dependabot secrets HOT 1
- [DOCS]: Broken link for request-reviewers-for-a-pull-request HOT 2
- [FEAT]: Support codespaces API HOT 1
- [FEAT]: Support for Environment based Repository Secrets HOT 1
- [FEAT]: Add methods for app webhooks HOT 1
- [BUG]: Fetch a given reference uses the wrong API HOT 5
- [FEAT]: add missing endpoints HOT 2
- [BUG]: OAuth token auth applies a different Authorization header than using curl or postman HOT 6
- [DOCS]: README and yardocs refer to deleted method `#create_authorization` HOT 1
- [FEAT]: Refresh a user's access token with refresh token HOT 1
- Test issue HOT 1
- [FEAT]: Support Org Secrets HOT 1
- Get Projects by personal access token-Must have admin rights to Repository HOT 1
- [FEAT]: Provide response types with Sorbet HOT 1
- [BUG]: HTTP caching middleware returns cached responses to wrong users HOT 4
- [BUG]: `list_app_installation_repositories` does not return `rels` HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from octokit.rb.