Error: Invalid status code '404' for url 'https://api.github.com/repos/<user>/<repo>'
See original GitHub issueHey
I have some problems using push actions. First, no push would happen because of not pulled beforehand but found the solution to that. Now it can not access the GitHub API. I have set the GitHub token and everything. The Repo is private.
Error: Invalid status code '404' for url 'https://api.github.com/repos/<USER>/<REPO>'
at IncomingMessage.<anonymous> (/home/runner/work/_actions/ad-m/github-push-action/master/start.js:14:21)
at IncomingMessage.emit (events.js:215:7)
at endReadableNT (_stream_readable.js:1184:12)
at processTicksAndRejections (internal/process/task_queues.js:80:21) {
res: IncomingMessage {
_readableState: ReadableState {
objectMode: false,
highWaterMark: 16384,
buffer: BufferList { head: null, tail: null, length: 0 },
length: 0,
pipes: null,
pipesCount: 0,
flowing: true,
ended: true,
endEmitted: true,
reading: false,
sync: true,
needReadable: false,
emittedReadable: false,
readableListening: false,
resumeScheduled: false,
paused: false,
emitClose: true,
autoDestroy: false,
destroyed: false,
defaultEncoding: 'utf8',
awaitDrain: 0,
readingMore: true,
decoder: null,
encoding: null
},
readable: false,
_events: [Object: null prototype] { end: [Array], data: [Function] },
_eventsCount: 2,
_maxListeners: undefined,
socket: TLSSocket {
_tlsOptions: [Object],
_secureEstablished: true,
_securePending: false,
_newSessionPending: false,
_controlReleased: true,
_SNICallback: null,
servername: 'api.github.com',
alpnProtocol: false,
authorized: true,
authorizationError: null,
encrypted: true,
_events: [Object: null prototype],
_eventsCount: 9,
connecting: false,
_hadError: false,
_parent: null,
_host: 'api.github.com',
_readableState: [ReadableState],
readable: true,
_maxListeners: undefined,
_writableState: [WritableState],
writable: false,
allowHalfOpen: false,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: undefined,
_server: null,
ssl: [TLSWrap],
_requestCert: true,
_rejectUnauthorized: true,
parser: null,
_httpMessage: [ClientRequest],
[Symbol(res)]: [TLSWrap],
[Symbol(asyncId)]: 3,
[Symbol(kHandle)]: [TLSWrap],
[Symbol(lastWriteQueueSize)]: 0,
[Symbol(timeout)]: null,
[Symbol(kBuffer)]: null,
[Symbol(kBufferCb)]: null,
[Symbol(kBufferGen)]: null,
[Symbol(kBytesRead)]: 0,
[Symbol(kBytesWritten)]: 0,
[Symbol(connect-options)]: [Object]
},
connection: TLSSocket {
_tlsOptions: [Object],
_secureEstablished: true,
_securePending: false,
_newSessionPending: false,
_controlReleased: true,
_SNICallback: null,
servername: 'api.github.com',
alpnProtocol: false,
authorized: true,
authorizationError: null,
encrypted: true,
_events: [Object: null prototype],
_eventsCount: 9,
connecting: false,
_hadError: false,
_parent: null,
_host: 'api.github.com',
_readableState: [ReadableState],
readable: true,
_maxListeners: undefined,
_writableState: [WritableState],
writable: false,
allowHalfOpen: false,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: undefined,
_server: null,
ssl: [TLSWrap],
_requestCert: true,
_rejectUnauthorized: true,
parser: null,
_httpMessage: [ClientRequest],
[Symbol(res)]: [TLSWrap],
[Symbol(asyncId)]: 3,
[Symbol(kHandle)]: [TLSWrap],
[Symbol(lastWriteQueueSize)]: 0,
[Symbol(timeout)]: null,
[Symbol(kBuffer)]: null,
[Symbol(kBufferCb)]: null,
[Symbol(kBufferGen)]: null,
[Symbol(kBytesRead)]: 0,
[Symbol(kBytesWritten)]: 0,
[Symbol(connect-options)]: [Object]
},
httpVersionMajor: 1,
httpVersionMinor: 1,
httpVersion: '1.1',
complete: true,
headers: {
server: 'GitHub.com',
date: 'Tue, 05 Jan 2021 06:13:21 GMT',
'content-type': 'application/json; charset=utf-8',
status: '404 Not Found',
'x-github-media-type': 'github.v3; format=json',
'access-control-expose-headers': 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset',
'access-control-allow-origin': '*',
'strict-transport-security': 'max-age=31536000; includeSubdomains; preload',
'x-frame-options': 'deny',
'x-content-type-options': 'nosniff',
'x-xss-protection': '1; mode=block',
'referrer-policy': 'origin-when-cross-origin, strict-origin-when-cross-origin',
'content-security-policy': "default-src 'none'",
vary: 'Accept-Encoding, Accept, X-Requested-With',
'x-ratelimit-limit': '60',
'x-ratelimit-remaining': '59',
'x-ratelimit-reset': '1609830801',
'x-ratelimit-used': '1',
'content-length': '107',
connection: 'close',
'x-github-request-id': '07C0:70A3:5627175:C8346CC:5FF40381'
},
rawHeaders: [
'server',
'GitHub.com',
'date',
'Tue, 05 Jan 2021 06:13:21 GMT',
'content-type',
'application/json; charset=utf-8',
'status',
'404 Not Found',
'x-github-media-type',
'github.v3; format=json',
'access-control-expose-headers',
'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset',
'access-control-allow-origin',
'*',
'strict-transport-security',
'max-age=31536000; includeSubdomains; preload',
'x-frame-options',
'deny',
'x-content-type-options',
'nosniff',
'x-xss-protection',
'1; mode=block',
'referrer-policy',
'origin-when-cross-origin, strict-origin-when-cross-origin',
'content-security-policy',
"default-src 'none'",
'vary',
'Accept-Encoding, Accept, X-Requested-With',
'X-Ratelimit-Limit',
'60',
'X-Ratelimit-Remaining',
'59',
'X-Ratelimit-Reset',
'1609830801',
'X-Ratelimit-Used',
'1',
'Content-Length',
'107',
'Connection',
'close',
'X-GitHub-Request-Id',
'07C0:70A3:5627175:C8346CC:5FF40381'
],
trailers: {},
rawTrailers: [],
aborted: false,
upgrade: false,
url: '',
method: null,
statusCode: 404,
statusMessage: 'Not Found',
client: TLSSocket {
_tlsOptions: [Object],
_secureEstablished: true,
_securePending: false,
_newSessionPending: false,
_controlReleased: true,
_SNICallback: null,
servername: 'api.github.com',
alpnProtocol: false,
authorized: true,
authorizationError: null,
encrypted: true,
_events: [Object: null prototype],
_eventsCount: 9,
connecting: false,
_hadError: false,
_parent: null,
_host: 'api.github.com',
_readableState: [ReadableState],
readable: true,
_maxListeners: undefined,
_writableState: [WritableState],
writable: false,
allowHalfOpen: false,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: undefined,
_server: null,
ssl: [TLSWrap],
_requestCert: true,
_rejectUnauthorized: true,
parser: null,
_httpMessage: [ClientRequest],
[Symbol(res)]: [TLSWrap],
[Symbol(asyncId)]: 3,
[Symbol(kHandle)]: [TLSWrap],
[Symbol(lastWriteQueueSize)]: 0,
[Symbol(timeout)]: null,
[Symbol(kBuffer)]: null,
[Symbol(kBufferCb)]: null,
[Symbol(kBufferGen)]: null,
[Symbol(kBytesRead)]: 0,
[Symbol(kBytesWritten)]: 0,
[Symbol(connect-options)]: [Object]
},
_consuming: false,
_dumped: false,
req: ClientRequest {
_events: [Object: null prototype],
_eventsCount: 2,
_maxListeners: undefined,
outputData: [],
outputSize: 0,
writable: true,
_last: true,
chunkedEncoding: false,
shouldKeepAlive: false,
useChunkedEncodingByDefault: false,
sendDate: false,
_removedConnection: false,
_removedContLen: false,
_removedTE: false,
_contentLength: 0,
_hasBody: true,
_trailer: '',
finished: true,
_headerSent: true,
socket: [TLSSocket],
connection: [TLSSocket],
_header: 'GET /repos/DatStorm/crossfit-wod HTTP/1.1\r\n' +
'User-Agent: github.com/ad-m/github-push-action\r\n' +
'Host: api.github.com\r\n' +
'Connection: close\r\n' +
'\r\n',
_onPendingData: [Function: noopPendingOutput],
agent: [Agent],
socketPath: undefined,
method: 'GET',
path: '/repos/DatStorm/crossfit-wod',
_ended: true,
res: [Circular],
aborted: false,
timeoutCb: null,
upgradeOrConnect: false,
parser: null,
maxHeadersCount: null,
[Symbol(kNeedDrain)]: false,
[Symbol(isCorked)]: false,
[Symbol(kOutHeaders)]: [Object: null prototype]
}
},
body: '{"message":"Not Found","documentation_url":"https://docs.github.com/rest/reference/repos#get-a-repository"}'
}
Error: Invalid status code '404' for url 'https://api.github.com/repos/<USER>/<REPO>'
at IncomingMessage.<anonymous> (/home/runner/work/_actions/ad-m/github-push-action/master/start.js:14:21)
at IncomingMessage.emit (events.js:215:7)
at endReadableNT (_stream_readable.js:1184:12)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
Issue Analytics
- State:
- Created 3 years ago
- Reactions:7
- Comments:9 (2 by maintainers)
Top Results From Across the Web
how to fix 404 error in my github web page? [github]
Firstly, You need to keep a default index.html page in your current repository and also make sure your have given Github Username as ......
Read more >Error 404 not found - What does it mean & how to fix it!
A 404 error is the standardized HTTP status code. The message is sent from the webserver of an online presence, to the web...
Read more >“Unexpected status code 404” error when running ...
HelloI'm getting the following error with the zapier-platform-example-app-github when I try the step in the guide at ...
Read more >HTTP 404 - Wikipedia
In computer network communications, the HTTP 404, 404 not found, 404, 404 error, page not found or file not found error message is...
Read more >Generating custom error responses - Amazon CloudFront
For example, if a viewer requests an invalid URL, your web server returns an HTTP 404 (Not Found) status code to CloudFront, and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
solves the problem as you suggested. Thank you for your time.
Already discussed in #68. Thank for you detailed report. I will take look on that in few hours. I believe authorization is perfomed in wrong way.
As workaround I suggest add
branch: master
orbranch: main
in workflow.