Not able to push files using clasp push command - google-apps-script

I am able to get the files using clasp pull command but not able to update the files using clasp push command. It says "No files to push".
When I run command clasp status then it shows all of my project files in "Ignore files". Previously it was working completely and the problem occurred yesterday when I changed my laptop.
I also tried making .claspignore file and it also did not work.
For reference, please see the screenshot.
Please help.

I think for me I found the issue after using trying
clasp version "YOUR_VERSION_STRING".
I got a console message to enable API access. Once I enabled that I was able to make pushes. It's funny because I was able to clone and pull just fine.
So this is the Settings URL and then make sure that "Google Apps Script API Access" is on.

Related

Error working with google apps script locally in VSCode using CLASP and push command

I have cloned a google apps script project but when trying to deploy the changes with the push command I get the following error:
PS D:\evcPRD> clasp push
No valid D:\evcPRD.clasp.json project file. You may need to create or clone a project first.
Any idea how to solve this?
Thank you

Is there a way to restore previous Google Apps Script Editor Versions

Is there a way to restore previous Google Apps Script Editor Versions?
I accidentally deleted a big portion of my code in the Google Script Editor. In the new editor, I do not see a way to restore versions.
In the old editor, I can go to File > See version history (please see image).
Unfortunately, this only goes back a few hours.
Is there a way to retrieve a version from yesterday?
TIA
You can try reverting to the legacy editor to access your script revision by clicking on the "Use legacy editor" button on the top right of the Apps Script window.
Even if you weren't already using clasp, when you created those versions, you can still use it now to retrieve the code for them. However, this only works if you created an explicit version of the code, under deployments, even if you didn't actually deploy them.
First install NPM, then:
npm i #google/clasp -g # install clasp
clasp login # login to your Google account
mkdir some_folder
cd some_folder
clasp clone <ScriptId> # replace <ScriptID> with your script id
clasp pull --versionNumber X # replace X with version number you want

Clasp Could not read API credentials. Are you logged in globally?

I'm logging in with clasp login --creds <file> which produces a local .clasprc.json file.
It says that I am logged in, but when I run another command I get:
Could not read API credentials. Are you logged in globally?
Any thoughts on why its not looking at my local clasprc file first?
Currently using version clasp v. 2.2.0
I ran into the same problem on Windows 10 and found that you need to login both globally and locally to use clasp run. There should be a .clasprc.json file in both your project folder and user folder.
I think I have finally found the solution for the same problem
Follow along with the comments from this github issue
Add the "oauthScopes" field to your local code and push it to your app
If you can't push, then copy-paste it to manifest file in the browser
Then you have to publish the app, and there were few things I've done, not sure which one helped. In the app in browser:
add the app version in File->Manage Versions
Publish -> Deploy as API executable
try to login with clasp and creds.json file
try to run something clasp run testRun
it may show the error that you're missing some oauth permissions, but it will list which ones, and you can add them
In my case, one weird thing that also helped was to enable some Google API
so in the app in browser: Resources -> Advanced Google Services -> enable some API
then try to do clasp run
if it works, you can disable the API that you have enabled previously.
Hope that helps

file deleting in nitrous.IO

I am playing with a repo I've cloned in nitrous.IO.
I mistakenly created a "README_UPDATE" file without the .md extension when I was planning to push my commit to github. I've tried to 'rm README_UPDATE' with no success in the command prompt; and right click file delete is not working in either nitrous.io on the web IDE or their google app extension.
I've also tried 'ls' to make sure I was in the right directory just in case anyone is asking.
I don't want to delete all my work, so is their any other options for me?
Have you tried right clicking the file and selecting 'rename'?

Where do I see the shell script output in Hudson

I have written a shell script to build my project using hudson.
I have put some comments that will be displayed on the console by using echo command. This will help me to debug the scripts if there are any errors. Rigt now the script works fine without any bugs. But in future if there are any errors, I would like to See the logs and identify which part/command of the script is causing the problem.
In this regard I have two questions: 1. Where can I find the logs or the output of the build scripts? 2. Where can I see the hudson log files? I have started hudson by placing the hudson.war file under webapps folder of Tomcat.
You should be able to see the console output for each build by choosing the "Console" menu option on the build menu on the left of the page.
The Hudson logs are visible from within Hudson itself. Just go to "Manage Hudson" on the main menu, then choose "System Log".
I'm not sure if that's exactly what you were looking for. If not, please clarify and I'll try help.