Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

320
Views
No se puede conectar a la cuenta de Github usando octokit

No puedo conectarme a GitHub y obtener la credencial de mi cuenta usando la gema "octokit".

 client = Octokit::Client.new( client_id: ENV['GITHUB_CLIENT_ID'], client_secret: ENV['GITHUB_CLIENT_SECRET'], )

Archivo de gemas:

 ruby '2.7.2' gem 'rails', '~> 6.1.4', '>= 6.1.4.3' gem "octokit", "~> 4.0"

Mensaje de error: Octokit::Unauthorized (GET https://api.github.com/user : 401 - Requiere autenticación // Ver: https://docs.github.com/rest/reference/users#get-the-authenticated -usuario )

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Yo tuve el mismo problema. Resolví el problema así:

 client.user(ENV['GITHUB_LOGIN'], :headers => { "X-GitHub-OTP" => "2fa-token"})

Si no tiene un ENV['GITHUB_LOGIN'], simplemente escriba el nombre de usuario de Github

 client.user('codescaptain', :headers => { "X-GitHub-OTP" => "2fa-token"})
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!