Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

185
Vistas
"POST /user/repos" does not support clientId/clientSecret basic authentication

I'm trying to create a Github Repository via an NPM package Octokit. I've set up the necessary oAuth stuff, but keep getting the same error:

HttpError: [@octokit/auth-oauth-app] "POST /user/repos" does not support clientId/clientSecret basic authentication.

import { Injectable } from '@nestjs/common';
import { Octokit } from "@octokit/rest";
import { createOAuthAppAuth } from "@octokit/auth-oauth-app";

@Injectable()
export class AppService {
  private auth() {
    return createOAuthAppAuth({
      clientType: "oauth-app",
      clientId: "xxxxxxxxxxxxxxx",
      clientSecret: "xxxxxxxxxxxxxxxxxxxxxxx",
    });
  };

  public async create() {
    const octokit = new Octokit({
      authStrategy: createOAuthAppAuth,
      auth: this.auth()
    });

    return await octokit.rest.repos.createForAuthenticatedUser({
      name: `repoName/${new Date().toString()}`
    }).then(({ data }) => { message: data });
  }

}

about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

I can't thank you enough for taking the time to come back and answer your own question! I was stuck in recursive README hell going through all of the octokit repos until I found your answer 😅

about 4 years ago · Juan Pablo Isaza Denunciar

0

I just needed to add a Personal Access Token rather than going to oAuth way.

const octokit = new Octokit({
  auth: "mypersonalaccesstoken123",
});

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda