Publish VSCode extension - unauthorized - plugins

I've made a vscode extension, but when I try to publish, I get the unauthorized error.
I've created a Personal access token as described here.
I realized that when I select Selected Scopes instead of All Scopes and select all available scopes, some of them stay unchecked after save... I don't know why...
The error message is not self explained "Error: Failed Request: Unauthorized(401) -" with nothing after the "-"...

I suggest to post this and other extension related issues at our GitHub issue tracker: https://github.com/Microsoft/vscode/issues

Related

GitHub Copilot not activation when i login

GitHub Copilot show this error GitHub Copilot could not connect to server. Extension activation failed: "User not authorized"
But I have authorized on GitHub
If you are trying GitHub copilot for the first time, this error indicates that you are not part of the beta invite list. What you can do is you can join the waitlist (https://github.com/features/copilot/signup) and wait for your chance to try the beta.
If you have already got the invitation, then there was an error connecting to api.github.com to request a token to use the Copilot service.
Full Discussion: https://github.com/github/feedback/discussions/7707

Github: Failed to add secret. Please try again

I just created a IAM User in AWS and am now wanting to add the access key ID and the secret access key to my forked Github project for use in GitHub actions
I use the same name as defined in my workflow yml for GitHub actions, and enter the text copied from IAM, and I get this error with no further text:
Failed to add secret. Please try again.
Do you know what may cause this?
I had the same issue on Safari. The console showed JS errors:
"Unrecognized Content-Security-Policy directive 'worker-src'"
...
Setting the secret through Chrome worked though.

Postman request showing IBM cloud down for maintenance

I am trying to send post request to create a toolchain on ibm cloud but getting this error mentioned in screenshot since last three days.
Why this error is coming up,am i doing something wrong?
Also i checked ibm none of the servers are down,cloud is normal
EDIT:So now i am able to create the toolchain,seems it was Authorization token error.
But now i am not Able to add a delivery pipeline through an api to an existing toolchain,is this functionality provided in IBM?
We are trying to understand your situation, but we have not been able to reproduce that Error 500 and "IBM Cloud console is down for maintenance" error you're seeing.
Could you try it again and let us know the datestamp&timezone of when you tried (so we can check our logs)?
Also can you give us the details of your default region, please?, as in if you open
https://cloud.ibm.com/devops/toolchains
does it redirect to:
https://cloud.ibm.com/devops/toolchains?env_id=ibm%3Ayp%3Aeu-de
or to some other non-(eu-de) region?
We did see this entry in the log files:
[2019-07-31T15:06:43.934] [ERROR] template-v2 - Failed to read template from repo https://github.com/open-toolchain/simple-toolchain, branch master, type null: Authorization header contains invalid or expired credentials.
but that occurs when using an invalid Authorization header token, and the response to the browser is not Error 500, but is Error 400 with:
"errorDetails\":\"Property 'access_token' either missing or empty \"
Also, when attempting to create the open-toolchain/simple-toolchain template, it doesn't work; it gives Error 400:
"description":"Failed Schema Validation at prod-region,prod-organization,prod-space,api-key for pipeline"
but creating a toolchain works ok using the repository:
https://github.com/open-toolchain/headless-toolchain
You can provision a toolchain with components such as a delivery pipeline using a GET request. The building blocks are described in the documentation for the IBM Cloud Continous Delivery service as part of creating a "Deploy" button.
There are some tutorials that use that deploy button to build more complex solutions, like the secure-file-storage, logistics-wizard-toolchain, or insurance-toolchain.
The GET request starts off a more complex flow because you need to log in, often provide values, etc. So I would recommend to try that request in a browser and not POSTMAN.
I am now able to create toolchain using POST request.
I was using wrong token for Authorization and got confused since no error message was shown instead "IBM cloud is under maintenance" popped up.

Get Github Enterprise Stats using API

i am trying to fetch statistics of GitHub instance using the below command as per https://developer.github.com/enterprise/2.15/v3/enterprise-admin/admin_stats/
curl -u username:password https://<hostname>/api/v3/enterprise/stats/:all
However i am getting the below message. Please help me in fixing this issue
{
"message": "Not Found",
"documentation_url": "https://developer.github.com/enterprise/2.14/v3"
}
Since the documentation states:
It is only available to authenticated site administrators.
Normal users will receive a 404 response if they try to access it.
Check first if you are declared as a site admin on your GitHub Enterprise server.
The issue got sorted by removing : (before all) in the api

github api does not return my post-receive web hook

I have manually added a web hook to my repository, but when I query the repository using the API I get
{
"message": "Not Found"
}
what is wrong?
the url: https://api.github.com/repos/akonsu/kamyanov-art.com/hooks/
First, don't put the extra '/' at the end.
That will get you an message "Not Found" every time, authenticated or not.
Second, to add to Ivan's answer, you need to authenticate to access that information about a repo (public or private).
As mentioned in the "API Getting Started" page:
HTTP/1.1 404 Not Found
{
"message": "Not Found"
}
Oh noes! Where did it go?
If you’re a grizzled HTTP user, you might expect a 403 instead.
Since we don’t want to leak information about private repositories, the GitHub API returns a 404 in this case, as if to say “we can neither confirm nor deny the existence of this repository.”
That is why you see a "Not Found" here.
See issue 294
fwiw, I was scratching my head on this same issue trying to debug a hook, and the solution was to pass basic authentication on the request.
You are probably trying to access the API endpoint without authorising (in which case he API will return a 404 response and the JSON error you mentioned). Try passing your credentials with:
curl -v -u akonsu https://api.github.com/repos/akonsu/kamyanov-art.com/hooks