What is the octokit.js's method for updating Readme file? - github

I am using Octokit/rest to edit github files. When I am trying to edit the ReadMe file using the octokit.repos.createOrUpdateFileContents it throws the following error:
HttpError: Not Found
And this is the url I received in the error message:
https://api.github.com/repos/bob/repo-name/contents/README.md
So the error must be that the API call to get the readme file is wrong. So what is the correct method to use to update the ReadMe file?
edit:Created another file with a random name and tried to reach it via this method, it also throws the same error.
Thank you.

Sorry, it's my bad that I used underscore in the repo owner value. I should have used a hyphen. That's the error.
Leaving it here so someone might find it helpful in the future.

Related

Why can't I read variable values anymore?

So I’ve been having some sort of issue with my iOS project.
I’m no longer able to debug properly on xcode the po command will no longer work.
this is what I get when i try to use “po”
error: expression failed to parse:
error: virtual filesystem overlay file '/Users/distiller/Library/Developer/Xcode/DerivedData/SendBirdCalls-dbjqlfwikkijbkgvuxucoxlahpdv/Build/Intermediates.noindex/ArchiveIntermediates/SendBirdCalls/IntermediateBuildFilesPath/SendBirdCalls.build/Release-iphoneos/SendBirdCalls.build/all-product-headers.yaml' not found
error: virtual filesystem overlay file '/Users/distiller/Library/Developer/Xcode/DerivedData/SendBirdCalls-dbjqlfwikkijbkgvuxucoxlahpdv/Build/Intermediates.noindex/ArchiveIntermediates/SendBirdCalls/IntermediateBuildFilesPath/SendBirdCalls.build/Release-iphoneos/SendBirdCalls.build/all-product-headers.yaml' not found
error: couldn't IRGen expression. Please check the above error messages for possible root causes.
can someone clarify what is going on?
i’ve already tried to clean derived data.
I also tried to follow these steps just to end up with another problem.
unable to debug some variables

GitHub - Error: (/github/workspace/./_config.yml): mapping values are not allowed in this context

I'm unfamiliar with GitHub and having an error while building an online CV using jekyll.
The error message is:
Error: (/github/workspace/./_config.yml):
mapping values are not allowed in this context.
What is causing this error and how can I resolve it?
Not sure if this is enough context, but I'm happy to provide the reciprocity to get some help with figuring it out.
Double-check your yaml workflow file for your GitHub Action (using for instance YAML Lint or YAML Validator)
That will tell you if something is misplaced, and would explain the error message.

Typicode My json server shows "404 error Oops, can't find db.json file on main or master branch. Try to create one and retry."

I had configured JSON server and created a db.json file and even added in some data, everything worked fine so I pushed it to Github, I replaced my localhost JSON server port URL with the one of typicode i.e https://my-json-server.typicode.com/myGithubUsername/myRepository/resource and tested again, still, things worked but after changing my GitHub repository to private am now getting this when I try to access the resource!
404 error Oops, can't find db.json file in myGithubUsername/myRepository/resource on main or master branch. Try to create one and retry.
I changed my GitHub repository back to public and it solved the
problem but this was for my employees so it shouldn't remain public, I
don't know if anyone has a better way to fix this, but this worked!

PowerShell:Download a file from URL with 257 chars and 404 returned

I tried to download a file from a url which has 257 characters,but the following error is returned:
Exception calling "DownloadFile" with "2" argument(s): "The remote server returned an error: (404) Not Found."
When I copy the URL to firefox or IE, I can download that file. then I tried to download a file from the same website but whose URL is short, I can download it successfully with Powershell.
Does anybody find the similar issue before? Could you pls share how to solve it?
Thanks a lot.
I recently faced the exact same issue and this is how I resolved it. Thought it would help someone who comes to this thread later.
In my case, the reason for the exception was incorrect URL due to a parameter I added to the URL. Something like this:
https://yourserverurl/archive-$OS.zip
I was using a parameter in the URL for the Operating System. And I was getting the $OS argument wrong.
Therefore, the two reasons I can think of when this error occurs:
The file cannot be downloaded without authentication. But that would probably throw a 401.
The URL is incorrect. Maybe due to some parametrization as in my case.
Hope this helps!

Eclipse CVS repository explorer

when I want to start CVS repository explorer, it cannot connect to the server.
I entered something like "a.b.com" as "host" and "/c/d" as repository path. I entered my username and password and "module" name correctly. Does anybody know what the problem is?
Thank you so much.
shadi :)
It depends on:
the version of Eclipse
the way it fails (right at the beginning or after some time like bug 229982 )
what Windows/Show Views/Error log displays (is there an error message or an exception of some kind associated with the failed connection
external factors like a new anti-virus or firewall which would block some ports previously unblocked.
For instance, do you see this kind of error message as in this thread?
Errors saving CVS synchronization information to disk.
Please fix the problems listed below and then
update the affected resources from the CVS repository.
Could not get input stream
Could not get input stream
Operation failed. File system input or output error
As the OP Shadi says in the comments, it was a protocol issue:
I should have used "extssh" instead of "pserver".
which is compliant with:
this ticket: "'extssh' is a valid protocol in CVS nowadays.",
and the way eclipse uses CVS.