Open Workspace edit google cloud (cloud shell) dont work - google-cloud-platform

Yesterday I tried to delete folders in the cloud shell editor, being impossible to delete.
This morning I have decided to remove all the files from the main directory:
sudo rm -rf $ HOME
Now I click on the button -> Open workspace and it does nothing.
It also does not receive repositories from GitHub.
Any ideas?.
Thank you.

I understand that you deleted all your files from the home folder and now you are unable to use Cloud Shell, please correct me if this is not your situation.
If this is the case you can try to restart your Cloud Shell by pressing in the three dots on the top right corner and select ´Restart´. If this doesn't help you can also try to boot in Safe Mode.
If your problem is selecting a workspace keep in mind that after you used the command ´sudo rm -rf $ HOME´ you most likely deleted your workspace folder that is usually inside of the home dir. You will have to create a new folder and select it as your new workspace in the ´Open Workspace´ menu

Related

What cloudbuild.yaml "gcloud app deploy" uses?

The subject basically says it all.
I am using gcloud app deploy but I'd like to tweak the build process, is there a way to get the cloudbuild.yaml file that is used by default to have something to start from?
Follow below steps if you already have a app deployed to find the 'cloudbuild.yaml' file:
Open Cloud shell.
On the Cloud Shell window menu bar click 'Open Terminal' and click 'Open in a New Window'.
In the new Editor window, you have Search option on the left pane, use it to find the file.
To create a basic build config file follow this guide:
https://cloud.google.com/build/docs/configuring-builds/create-basic-configuration

How do I view the contents of my build artifact folder in Azure Dev Ops?

I am trying to modify my configuration file, dataSettings.json, located somewhere inside the build artifacts folder. Figuring out the correct access path to it is like working in the dark. Using "**/dataSettings.json" as a path doesn't work in my task since I don't know the artifact's folder structure, nor wether dataSettings.json even exists.
Is there a way to quickly view the contents of a build artifacts folder within DevOps?
Add a script step in your shell scripting language of choice (bash, PowerShell, Windows command prompt, etc) that recursively outputs the directory structure. Specific commands are easy to Google. i.e. PowerShell would be gci -rec. DOS would be dir /s. Bash would be ls -R.
You can quickly view the contents of the artifacts in many of the tasks in your release pipeline.
For example, If you are using File transform task or Azure App Service deploy task. You can click the 3dots at the right end of the Package or folder field to view the contents and folder structure of the artifacts.
The Source Folder field of Copy files tasks for example:
If the artifacts is a zip file. You can navigate to its correponding build pipeline runs and download the artifacts locally to check its contents. You can download the build artifacts at the Build summary page.

view contents of directory in google cloud

Does anyone know how to view the contents of a directory in gcloud.
I ran
gcloud compute ssh --zone=us-west1-b cs231-vm
from powershell and connected to my instance.
I am trying to navigate to like this:
cd cs231n/datasets
according to a tutorial here:
http://cs231n.github.io/assignments2018/assignment1/
But it says no such file or directory and so I want to know what is in the current directory. I tried ls and dir but get nothing.
ls or dir definitely works on gcloud, it seems probably you might have missed few steps of downloading folder/data. Please see if you have completed First time setup from http://cs231n.github.io/gce-tutorial/
You can also 'view gcloud command' by clicking ssh dropdown available at list of vm-instances page. Additionally you can pass --project='project-name' to your gcloud ssh command.

How to set up and use EC2 CLI on Mac?

I am stuck at using Amazon EC2 CLI.
I have downloaded the Command Line Tools from
http://aws.amazon.com/developertools/351.
I placed the bin and lib folder into my Amazon project folder: /Users/Invictus/EC2
I downloaded the cert-xxxx.pem and pk-xxx.pem into the same folder.
Created a .bash_profile in the same folder.
I tried to execute ec2-describe-images -o amazon after I moved to cd /Users/Invictus/EC2.
The system does not recognise the command: command not found.
If I try to execute the same command inside the bin folder, the result is the same.
My .bash_profile:
export EC2_HOME=~/.EC2
export PATH=$PATH:$EC2_HOME/bin
export EC2_PRIVATE_KEY=`ls $EC2_HOME/pk-*.pem`
export EC2_CERT=`ls $EC2_HOME/cert-*.pem`
export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home/
Where did I make a mistake?
My aim is to connect to the launched instance and be able to execute commands there from my local machine.
I have Java installed.
The newer AWS Unified CLI Tools is much, much easier to set up. All you need is Python, which comes built-in to every Mac.
Here are a few things I can think of:
Your .bash_profile should be in /Users/Invictus/ , not /Users/Invictus/EC2. Move it to your home directory and log off and log back in (or restart your machine) and see if it picks up the right path.
Instead of ec2-describe-images, can you run it as "./ec2-describe-images" - does that work? If not, can you check the permissions on that script?

Git Bash- permission denied when trying to remove directory. Is there a sudo-like command for Git bash?

I've created a bitbucket repository and started out with this tutorial:
https://confluence.atlassian.com/display/BITBUCKET/Clone+Your+Git+Repo+and+Add+Source+Files
All was going well until I've cloned the empty repository, which created a folder called bb101repo, just like the tutorial asked. Then, the tutorial goes on to explain how the name of this folder is not precise enough and how we should make a new one, by a different name.
So, when I tried to remove the folder using the command rm -irf "bb101repo/"
the terminal displays this message:"rm:cannot remove directory 'bb101repo': Permission denied.
Is there a way of going sudo?
I had the same problem and found that when I close the IDE (Aptana in my case) I can remove the .git folder. The IDE was locking the directories and not letting the OS delete the files. Hope this helps.
sudo rm -rf filename should do the trick
(you can be asked for your password)
to see what permissions files have you can use ls -l in the directory where your maps are stored
you can change the file permissions by using: chmod 755 in the folder u want to change if u want to do it recursive just add -R
chmod -R 755 (r-rw-rwx)