Bad Credentials #23

Closed
opened 2025-07-08 08:33:21 -04:00 by AtHeartEngineer · 0 comments

Originally created by @Aetherinox on 11/13/2023

Hey,

I have my docker-compose.yml which has my Gitea / Github credentials. However, when I review the docker logs for mirror-to-gitea, I keep getting an error about bad credentials, and then also a syntax error

/app/node_modules/@octokit/request/dist-node/index.js:86
      const error = new requestError.RequestError(toErrorMessage(data), status, {
Node.js v18.14.2
Starting to create mirrors...
/app/node_modules/@octokit/request/dist-node/index.js:86
      const error = new requestError.RequestError(toErrorMessage(data), status, {
                    ^

RequestError [HttpError]: Bad credentials
    at /app/node_modules/@octokit/request/dist-node/index.js:86:21
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Object.next (/app/node_modules/@octokit/plugin-paginate-rest/dist-node/index.js:112:28)
    at async getGithubRepositories (/app/src/index.js:11:39)
    at async main (/app/src/index.js:121:30) {
  status: 401,
  response: {
    url: 'https://api.github.com/users/aetherinox/repos',
    status: 401,
    headers: {
      'access-control-allow-origin': '*',
      'access-control-expose-headers': 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset',
      connection: 'close',
      'content-length': '80',
      'content-security-policy': "default-src 'none'",
      'content-type': 'application/json; charset=utf-8',
      date: 'Mon, 13 Nov 2023 22:18:12 GMT',
      'referrer-policy': 'origin-when-cross-origin, strict-origin-when-cross-origin',
      server: 'GitHub.com',
      'strict-transport-security': 'max-age=31536000; includeSubdomains; preload',
      vary: 'Accept-Encoding, Accept, X-Requested-With',
      'x-content-type-options': 'nosniff',
      'x-frame-options': 'deny',
      'x-github-media-type': 'github.v3; format=json',
      'x-github-request-id': 'C65A:7056:C11DB9:18F414A:6552A0A3',
      'x-ratelimit-limit': '60',
      'x-ratelimit-remaining': '30',
      'x-ratelimit-reset': '1699916753',
      'x-ratelimit-resource': 'core',
      'x-ratelimit-used': '30',
      'x-xss-protection': '0'
    },
    data: {
      message: 'Bad credentials',
      documentation_url: 'https://docs.github.com/rest'
    }
  },
  request: {
    method: 'GET',
    url: 'https://api.github.com/users/aetherinox/repos',
    headers: {
      accept: 'application/vnd.github.v3+json',
      'user-agent': 'octokit-rest.js/18.12.0 octokit-core.js/3.6.0 Node.js/18.14.2 (linux; x64)',
      authorization: 'token [REDACTED]'
    },
    request: { hook: [Function: bound bound register] }
  }
}

Node.js v18.14.2

I've checked those credentials over and over, and they appear correct. I'm even using them for another service. So I'm not sure what I'm missing here.

It was running fine before, and I noticed I created a new repo on Github but it never moved over to Gitea. So I checked docker and the process kept getting restarted every 5 or so seconds, and that's what popped up in the logs.

I even created a fresh Personal Access Token just for mirror-to-gitea, and same error.

*Originally created by @Aetherinox on 11/13/2023* Hey, I have my docker-compose.yml which has my Gitea / Github credentials. However, when I review the docker logs for mirror-to-gitea, I keep getting an error about bad credentials, and then also a syntax error ``` /app/node_modules/@octokit/request/dist-node/index.js:86 const error = new requestError.RequestError(toErrorMessage(data), status, { ``` ```json Node.js v18.14.2 Starting to create mirrors... /app/node_modules/@octokit/request/dist-node/index.js:86 const error = new requestError.RequestError(toErrorMessage(data), status, { ^ RequestError [HttpError]: Bad credentials at /app/node_modules/@octokit/request/dist-node/index.js:86:21 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async Object.next (/app/node_modules/@octokit/plugin-paginate-rest/dist-node/index.js:112:28) at async getGithubRepositories (/app/src/index.js:11:39) at async main (/app/src/index.js:121:30) { status: 401, response: { url: 'https://api.github.com/users/aetherinox/repos', status: 401, headers: { 'access-control-allow-origin': '*', 'access-control-expose-headers': 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset', connection: 'close', 'content-length': '80', 'content-security-policy': "default-src 'none'", 'content-type': 'application/json; charset=utf-8', date: 'Mon, 13 Nov 2023 22:18:12 GMT', 'referrer-policy': 'origin-when-cross-origin, strict-origin-when-cross-origin', server: 'GitHub.com', 'strict-transport-security': 'max-age=31536000; includeSubdomains; preload', vary: 'Accept-Encoding, Accept, X-Requested-With', 'x-content-type-options': 'nosniff', 'x-frame-options': 'deny', 'x-github-media-type': 'github.v3; format=json', 'x-github-request-id': 'C65A:7056:C11DB9:18F414A:6552A0A3', 'x-ratelimit-limit': '60', 'x-ratelimit-remaining': '30', 'x-ratelimit-reset': '1699916753', 'x-ratelimit-resource': 'core', 'x-ratelimit-used': '30', 'x-xss-protection': '0' }, data: { message: 'Bad credentials', documentation_url: 'https://docs.github.com/rest' } }, request: { method: 'GET', url: 'https://api.github.com/users/aetherinox/repos', headers: { accept: 'application/vnd.github.v3+json', 'user-agent': 'octokit-rest.js/18.12.0 octokit-core.js/3.6.0 Node.js/18.14.2 (linux; x64)', authorization: 'token [REDACTED]' }, request: { hook: [Function: bound bound register] } } } Node.js v18.14.2 ``` I've checked those credentials over and over, and they appear correct. I'm even using them for another service. So I'm not sure what I'm missing here. It was running fine before, and I noticed I created a new repo on Github but it never moved over to Gitea. So I checked docker and the process kept getting restarted every 5 or so seconds, and that's what popped up in the logs. I even created a fresh Personal Access Token just for mirror-to-gitea, and same error.
AtHeartEngineer added the bugquestionquestion labels 2025-07-08 08:33:23 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/mirror-to-gitea#23