Why Github workflows doesn't recognize command? - github

I built a github workflow and for some reason it doesn't recognize the dita.bat file as a command. All the files are present in the repo and checkout is performed.
Error:
ant
ant.bat
dita
dita.bat
sudo: ./dita.bat: command not found
Error: Process completed with exit code 1.
Github workflow step:
- name: Build WebHelp Responsive
run: |
cd oxygen-publishing-engine-3.x/bin
ls
sudo ./dita.bat --input=../../doc/project-documentation/search-service-
doc.ditamap --format=webhelp-responsive -
Dwebhelp.publishing.template=../../templates/webhelp-documentation-template --
output=../../doc/project-documentation/out

Please add chmod +x filename before calling your script.

Related

How to setup tRPC project with pnpm

I am trying to learn from this repo.
Step 3 of the setup instructions says to run yarn dx.
The package.json for this repo defines that script as:
"dx": "run-p dx:* --print-label",
When I try to do this, I get an error message that says:
yarn dx yarn run v1.22.19 $ run-p dx:* --print-label [dx:next
] $ run-s migrate-sqlite generate-sqlite db-seed && next dev
[dx:prisma-studio] $ pnpm prisma-studio-sqlite [dx:prisma-studio]
/bin/sh: pnpm: command not found [dx:prisma-studio] error Command
failed with exit code 127. [dx:prisma-studio] info Visit
https://yarnpkg.com/en/docs/cli/run for documentation about this
command. ERROR: "dx:prisma-studio" exited with 127. error Command
failed with exit code 1.
I'm not sure what pnpm means, or why prisma is trying to link to sqlite when the db it specifies is psql.
Can anyone point me in the direction of what's required to get this repo to start?
If you use yarn, change any occurrence in the package.json from pnpm to yarn and I think it should work :)

ERROR: Command errored out with exit status 128

I'm trying to download internal Git on Google Colab for running ML models; however, at first, I download like this
!pip install git+https://dev.azure.com/xxxxx/xxxxxx
It shown error so I found out in this website https://qdmana.com/2022/02/202202190011230865.html, showing that replace https with git like this may help.
!pip install git+git://dev.azure.com/xxxxx/xxxxxx
Nevertheless, it still shown the error as below,
Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/
Collecting git+git://dev.azure.com/xxx/xxx
Cloning git://dev.azure.com/xxx/xxx to /tmp/pip-req-build-mmz02x7l
Running command git clone -q git://dev.azure.com/xxx/xxx /tmp/pip-req-build-mmz02x7l
fatal: unable to connect to dev.azure.com:
dev.azure.com[0: 13.107.42.20]: errno=Connection timed out
dev.azure.com[1: 2620:1ec:21::20]: errno=Cannot assign requested address
WARNING: Discarding git+git://dev.azure.com/xxx/xxx Command errored out with exit status 128: git clone -q git://dev.azure.com/xxx/xxx /tmp/pip-req-build-mmz02x7l Check the logs for full command output.
ERROR: Command errored out with exit status 128: git clone -q git://dev.azure.com/xxx/xxx /tmp/pip-req-build-mmz02x7l Check the logs for full command output.
How do we address this issue?
Use codes below instead:
git clone https://{your username}:{your password}#dev.azure.com/xxxxxxx

FAILED: list-all did not return any version

I'm trying to install Java with the asdf plugin.
I could get the plugin but I cannot get the Java list.
The command:
asdf plugin-test java https://github.com/halcyon/asdf-java.git
gives me the message:
FAILED: list-all did not return any version
I'm on Windows 11 in a Tabby 1.0.179 / Git bash terminal.
Previously I could run the commands:
asdf plugin list
asdf plugin list all
asdf plugin add java
cd ~/dev/projects/myproject
asdf list
asdf list java
But the command:
asdf list all java
fails with the message:
Plugin java's list-all callback script failed with output:
/c/Users/stephane.2143929/.asdf/plugins/java/bin/list-all: line 1: functions: command not found
Indeed the ~/.asdf/plugins/java/bin/list-all file contains only one word: functions
As the access to the git repository is done through https and not ssh I have previously specified the GITHUB_API_TOKEN environment variable which is correctly set as seen by an echo $GITHUB_API_TOKEN command.
Regarding the git configuration, I was having the error message:
SSL certificate problem: unable to get local issuer certificate
and the property http.sslbackend had the value openssl
as showed by the command:
git config -l --show-origin
Then I typed in the command:
git config --global http.sslbackend schannel
and verified the changed property again:
git config -l --show-origin
and I could then clone some repository.

Git, Conda - How can I "pip install git+git:<repo>" with the new Git policies in place?

I have this conda yml file for installing dependencies and creating a new conda env.
conda_env.yml forked from https://github.com/MishaLaskin/rad:
name: rad
channels:
- defaults
dependencies:
- python=3.6
- pytorch
- torchvision
- cudatoolkit=9.2
- absl-py
- pyparsing
- pillow=6.1
- pip:
- termcolor
- git+git://github.com/deepmind/dm_control.git
- git+git://github.com/1nadequacy/dmc2gym.git
- tb-nightly
- imageio
- imageio-ffmpeg
- torchvision
- scikit-image
- tabulate
I try to run conda env create --file conda_env.yml and here's the stack trace I get.
Collecting package metadata (repodata.json): done
Solving environment: done
Installing pip dependencies: - Ran pip subprocess with arguments:
['/home/dyung6/anaconda3/envs/rad/bin/python', '-m', 'pip', 'install', '-U', '-r', '/home/dyung6/rad/condaenv.835gcx7g.requirements.txt']
Pip subprocess output:
Collecting git+git://github.com/deepmind/dm_control.git (from -r /home/dyung6/rad/condaenv.835gcx7g.requirements.txt (line 2))
Cloning git://github.com/deepmind/dm_control.git to /tmp/pip-req-build-nc4w5hv8
Pip subprocess error:
Running command git clone -q git://github.com/deepmind/dm_control.git /tmp/pip-req-build-nc4w5hv8
fatal: remote error:
The unauthenticated git protocol on port 9418 is no longer supported.
Please see https://github.blog/2021-09-01-improving-git-protocol-security-github/ for more information.
WARNING: Discarding git+git://github.com/deepmind/dm_control.git. Command errored out with exit status 128: git clone -q git://github.com/deepmind/dm_control.git /tmp/pip-req-build-nc4w5hv8 Check the logs for full command output.
ERROR: Command errored out with exit status 128: git clone -q git://github.com/deepmind/dm_control.git /tmp/pip-req-build-nc4w5hv8 Check the logs for full command output.
failed
CondaEnvException: Pip failed
Seems like the new git policies block you from doing this. Is there anyway around this?
As #torek points out, and the documentation directed to in the error message explains, the git:// protocol has phased out on GitHub. Switch to using https://, i.e., in this case:
- pip:
- git+https://github.com/deepmind/dm_control.git
- git+https://github.com/1nadequacy/dmc2gym.git
...

How to set node path for nodejs (Ubuntu)

I'm trying to setup nodejs to access a postgres database. What I've done so far is the following (https://gist.github.com/579814):
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl http://npmjs.org/install.sh | sh
then
git clone git://github.com/isaacs/npm.git
make
make install
so far, so good. However, when I try to install the postgres driver
npm install pg
I get the following:
node-waf configure build || true
Checking for program g++ or c++ : /usr/bin/g++
Checking for program cpp : /usr/bin/cpp
Checking for program ar : /usr/bin/ar
Checking for program ranlib : /usr/bin/ranlib
Checking for g++ : ok
Checking for node path : not found
Checking for node prefix : ok /usr/local
Checking for program pg_config : /usr/bin/pg_config
'configure' finished successfully (0.066s)
Waf: Entering directory `/home/christian/node_modules/pg/build'
[1/2] cxx: src/binding.cc -> build/default/src/binding_1.o
../src/binding.cc:3:25: fatal error: node_events.h: No such file or directory
compilation terminated.
Waf: Leaving directory `/home/christian/node_modules/pg/build'
Build failed: -> task failed (err #1):
{task: cxx binding.cc -> binding_1.o}
I've been looking around for setting the node path, although haven't found anything of help so far - probably also because I'm totally new to nodejs, so I'd be happy about any hint.
Now, you have NodeJS installed in your Ubuntu. You should set /etc/environment and load nodeJS path that can be executed by another users. For example:
NODE="/home/ubuntu/local/node"
NODE_PATH="/usr/local/lib/node_modules"
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:$NODE/bin:$NODE/lib/node_modules"
#PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
Do this in bash:
echo 'export NODE_PATH=~/local/:~/local/node_modules' >> ~/.bashrc
before things are fixed you must use node 0.5.1 (you can use gitk to revert the tree to this version)
Auteur: Ryan Dahl <ry#tinyclouds.org> 2011-07-19 10:46:38
Auteur du commit: Ryan Dahl <ry#tinyclouds.org> 2011-07-19 10:46:38
Parent: 0a3fc1d9c8becc32c63ae736ca2b3719a3d03c5b (Remove StatWatcher's dep on C++ EventEmitter)
Enfant: 061ce7b0ac370c8a5ae93d95ab7da171cbd488f0 (net_uv: Fix simple/test-http-expect-continue.js)
Branche: master, remotes/origin/master
Suit: v0.5.1
Précède: v0.5.2
Finally remove node::EventEmitter
I had the same problem.
The issue was that I was specifying a old version of PG in my package.js
After I removed the old version dependancy I was able to install PG without issue.