doctl install: neither $XDG_CONFIG_HOME nor $HOME are defined - github

Using Github actions to configure doctl (digitalocean) but getting this error when the job runs in the runner:
>>> doctl version v1.77.0 installed to /opt/github/actions-runner/_work/_tool/doctl/1.77.0/x64
/opt/github/actions-runner/_work/_tool/doctl/1.77.0/x64/doctl auth init -t ***
Error: neither $XDG_CONFIG_HOME nor $HOME are defined
Any suggestions or tips on how to get past this? Search DO's website & here, couldn't find any relevant material. Thanks!

Related

Error when following instructions on "Hosting scopes"

I was trying to follow the instructions on hosting scopes (https://bit.dev/docs/scope/running-a-scope-server).
Commands entered:
docker run -it -p 4000:3000 bitcli/bit-server:latest
http://localhost:4000
bit remote add http://localhost:4000
I get the following error after the bit remote add command:
error: scope not found at /Users/tdugger/development/bit
There must be a step missing. The browser page shown does say the following, but I'm not sure what that means.
Set "defaultScope": "remote-scope" in workspace.jsonc
file and export components here.
Thanks for your help.

cloud_sql_proxy gives "error reading config"... how do I fix this?

I have gcloud working in power shell:
> gcloud version
Google Cloud SDK 375.0.0
bq 2.0.74
core 2022.02.25
gsutil 5.6
I've been trying to follow these directions to get my Sql Management Studio to connect to a Google SQL service:
https://cloud.google.com/sql/docs/sqlserver/connect-admin-proxy#start-proxy
But I get this error:
PS C:\gcloud_stuff> ./cloud_sql_proxy -instances=<my instance connection>=tcp:1433
2022/03/06 02:02:51 GcloudConfig: error reading config: exit status 1; stderr was:
The system cannot find the path specified.
The system cannot find the path specified.
2022/03/06 02:02:51 google: could not find default credentials. See https://developers.google.com/accounts/docs/application-default-credentials for more information.
Does anyone know how to fix this? (I am new to Google Cloud)
Looks like you don't have a local set of credentials.
You can either run gcloud auth login and try again. Or you can create a service account key and pass it to the proxy with the -credentials_file flag. See the Proxy docs for details.

How do I fix a webui build that is causing CAfile error when git needs a cerfiticate for a npm install of noVNC

The specific error is:
11634 verbose node v12.14.1
11635 verbose npm v6.13.4
11636 error Error while executing:
11636 error /home/openbmc/code/openbmc/rpi-build/tmp/hosttools/git ls-remote -h -t https://github.com/novnc/noVNC.git
11636 error
11636 error fatal: unable to access 'https://github.com/novnc/noVNC.git/': error setting certificate verify locations:
11636 error CAfile: /opt/poky/3.1/sysroots/x86_64-pokysdk-linux/etc/ssl/certs/ca-certificates.crt
11636 error CApath: none
Testing manually:
If I run the command manually in a new shell, it fails the same, indicating it is using a default certificate path. If I run it in the shell with the environment for bitbake, it works. This is because GIT_SSL_CAINFO is properly defined.
The behavior suggests that when git is run from hosttools, it is not using the bitbake shell environment, because that environment defines a correct GIT_SSL_CAINFO with a path to the buildtools area with a valid certificate.
I assume that poky is creating a special environment for running hosttools independently from my main shell. If this is the case, there needs to be a way to add GIT_SSL_CAINFO into this environment, which I have no idea how to do.
I poked around other targets looking for clues but could not find anything that suggested to me this variable would be defined.
A search of the tree on GIT_SSL_CAINFO did not turn anything up, but it is possible there is a variable with another name.
perhaps there is a way to set http.sslCAInfo to take the place of GIT_SSL_CAINFO?
The context:
I first compiled up the raspberry pi build and tested that it runs. Then I added in meta-phosphor, which also pulls in webui.
webui has a dependency on noVNC, but with a specific version, which appears to cause this command to run and fail.
How I setup the build:
git clone https://github.com/openbmc/openbmc.git
git checkout cb91a77
# Modify layers to include meta-phosphor and webui
scripts/install-buildtools
. /home/openbmc/code/openbmc/poky/buildtools/environment-setup-x86_64-pokysdk-linux
bitbake bmap-tools-native -caddto_recipe_sysroot
. oe-init-build-env rpi-build (per session)
# Modify conf files in rpi-build
bitbake core-image-base
My work around:
sudo git config --system http.sslcainfo /home/openbmc/code/openbmc/poky/buildtools/sysroots/x86_64-pokysdk-linux/etc/ssl/certs/ca-certificates.crt
I would rather handle the problem in the build, but could not find a way to do so.

Unable to debug java app through stack driver in google kubernetes cluster

I am trying to debug a java app on GKE cluster through stack driver.
I have created a GKE cluster with Allow full access to all Cloud APIs
I am following documentation: https://cloud.google.com/debugger/docs/setup/java
Here is my DockerFile:
FROM openjdk:8-jdk-alpine
VOLUME /tmp
ARG JAR_FILE
COPY ${JAR_FILE} alnt-watchlist-microservice.jar
ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/alnt-watchlist-microservice.jar"]
In documentation, it was written to add following lines in DockeFile:
RUN mkdir /opt/cdbg && \
wget -qO- https://storage.googleapis.com/cloud-debugger/compute-java/debian-wheezy/cdbg_java_agent_gce.tar.gz | \
tar xvz -C /opt/cdbg
RUN java -agentpath:/opt/cdbg/cdbg_java_agent.so
-Dcom.google.cdbg.module=tpm-watchlist
-Dcom.google.cdbg.version=v1
-jar /alnt-watchlist-microservice.jar
When I build DockerFile, It fails saying tar: invalid magic , tar: short read.
In stackdriver debug console, It always show 'No deployed application found'. Which application it will show? I have already 2 services deployed on my kubernetes cluster.
I have already executed
gcloud debug source gen-repo-info-file --output-directory="WEB-INF/classes/
in my project's directory.
It generated source-context.json. After its creation, I tried building docker image and its failing.
The debugger will be ready for use when you deploy your containerized app. You are getting No deployed application found error because your debugger agent is failing to download or unzip in dockerfile.
Please check this discussion to resolve the tar: invalid magic , tar: short read. error.
Unfortunately it looks like Alpine isn't regularly tested with Debugger. There's a sample setup here that might help you: https://github.com/GoogleCloudPlatform/cloud-debug-java#alpine-linux
I resolved the issue.
Firstly, you will have to use java image "gcr.io/google-appengine/openjdk" instead of Alpine one.
Secondly,
I was putting entry points without comma separated (Basically in wrong format)
ENTRYPOINT ["java","-agentpath:/opt/cdbg/cdbg_java_agent.so", "-Djava.security.egd=file:/dev/./urandom" ,"-Dcom.google.cdbg.module=watchlist"]

Google SDK / Dialogflow Deployment Error

I've been following a tutorial on creating a chatbot with Dialogflow and I've reached the section to do the fulfillment. The Google Cloud SDK got installed but when it comes time to deploy the function I keep getting this error.
https://dialogflow.com/docs/getting-started/basic-fulfillment-conversation
Jasons-MBP-3:~ jason$ sudo gcloud beta functions deploy Goddard --stage-bucket goddard.appspot.com --trigger-http
-2 ['./.git', './.gitignore']
-1 [False, False]
ERROR: gcloud crashed (OSError): [Errno 2] No such file or directory: './Library/Application Support/Google/Chrome/RunningChromeVersion'
If you would like to report this issue, please run the following command:
gcloud feedback
To check gcloud for common problems, please run the following command:
gcloud info --run-diagnostics
I tried sudo and updating the gcloud components but still the same thing. I went to the folder it says doesnt exist and I see the file there but it's an alias. When I click the alias Finder says it can't be opened because th original can't be found. Any suggestions?
So a friend of mine told me that for this section it had to be running in the same directory where the index.js file is. In case anyone else gets stuck!