action #133520
closed[tools] please add useful information for openqa-clone-custom-git-refspec
Description
I need to setup openqa from scratch and run into an issue which is not easy to find the reason.
zaoliang@quake1:~> sudo openqa-clone-custom-git-refspec -v https://github.com/os-autoinst/os-autoinst-distri-opensuse/pull/17504 https://openqa.opensuse.org/tests/3461697 --apikey F5DEEB04FA524E0C --apisecret 5F150614E484ACCB
[sudo] Passwort für root:
/usr/bin/openqa-clone-custom-git-refspec: unrecognized option '--apikey'
/usr/bin/openqa-clone-custom-git-refspec: unrecognized option '--apisecret'
Usage:
openqa-clone-custom-git-refspec <github_pr_url> <openqa_job_url> [CUSTOM_TEST_VAR_1=foo] [CUSTOM_TEST_VAR_2=bar] ...
openqa-clone-custom-git-refspec <github_branch_url> <openqa_job_url> [CUSTOM_TEST_VAR_1=foo] [CUSTOM_TEST_VAR_2=bar] ...
Options:
-v, --verbose execute with verbose output
-h, -?, --help display this help
-n, --dry-run execute in dry-run mode, do not clone any openQA jobs
-c --clone-job-args pass additional parameters to 'openqa-clone-job', e.g. '--clone-job-args="--show-progress"'.
The default parameters are '--skip-chained-deps --parental-inheritance --within-instance' defined in the env variable $clone_args.
Examples:
openqa-clone-custom-git-refspec https://github.com/os-autoinst/os-autoinst-distri-opensuse/pull/6529 https://openqa.opensuse.org/tests/835060 DESKTOP=textmode
openqa-clone-custom-git-refspec https://github.com/coolgw/os-autoinst-distri-opensuse/tree/nfs https://openqa.opensuse.org/tests/835060 DESKTOP=textmode
openqa-clone-custom-git-refspec -n -c '--show-progress' https://github.com/coolgw/os-autoinst-distri-opensuse/tree/nfs https://openqa.opensuse.org/tests/835060 DESKTOP=textmode
openqa-clone-custom-git-refspec https://github.com/foursixnine/os-autoinst-distri-opensuse/tree/oopsitsbrokenagain https://openqa.opensuse.org/tests/3128467 NEEDLES_DIR='https://github.com/foursixnine/os-autoinst-needles-opensuse.git#oopsitsbrokenagain'
You need to set the environment variable GITHUB_TOKEN to use authenticated requests.
The problem is access permission of /etc/openqa/client.conf. At least user should be read it.
The information about GITHUB_TOKEN is not useful and not relevant or even misleading in this case.
After I change the read permission, I can execute the command without any issue.
Updated by zluo over 1 year ago
- Project changed from openQA Tests to openQA Project
- Category deleted (
Enhancement to existing tests)
Updated by tinita over 1 year ago
- Category set to Support
- Status changed from New to In Progress
- Assignee set to tinita
-c --clone-job-args pass additional parameters to 'openqa-clone-job', e.g. '--clone-job-args="--show-progress"'.
You need to pass the api arguments as additional parameters for openqa-clone-job.
openqa-clone-custom-git-refspec ... -c "--apikey ABC --apisecret DEF"
Updated by tinita over 1 year ago
- Status changed from In Progress to New
- Assignee deleted (
tinita)
I now read your comment
The problem is access permission of /etc/openqa/client.conf. At least user should be read it.
It was not easy to see because the help output wasn't formatted or quoted.
Yes, if the client.conf exists, but is not readable, we should at least output a warning.
Setting back to new for now.
Updated by zluo over 1 year ago
- Subject changed from [tools] please add use information for openqa-clone-custom-git-refspec to [tools] please add useful information for openqa-clone-custom-git-refspec
Updated by mkittler over 1 year ago
- Status changed from New to Feedback
- Assignee set to mkittler
The problem is access permission of /etc/openqa/client.conf. At least user should be read it.
The command you pasted definitely runs into an issue because you cannot specify openqa-clone-job
parameters this way. Follow what @tinita wrote in #133520#note-2. If that works you should at least be one step further.
Of course you should normally be able to completely leave out these parameters and rely on credentials in config files. Note that /etc/openqa/client.conf
is normally only supposed to be readable by _openqa-worker
for security reasons. I suppose it is recommend to put the credentials in the file ~/.config/openqa/client.conf
instead which can/should be readable by your normal user you also invoke openqa-clone-job
or openqa-clone-custom-git-refspec
with.
Updated by zluo about 1 year ago
mkittler wrote:
The problem is access permission of /etc/openqa/client.conf. At least user should be read it.
The command you pasted definitely runs into an issue because you cannot specify
openqa-clone-job
parameters this way. Follow what @tinita wrote in #133520#note-2. If that works you should at least be one step further.Of course you should normally be able to completely leave out these parameters and rely on credentials in config files. Note that
/etc/openqa/client.conf
is normally only supposed to be readable by_openqa-worker
for security reasons. I suppose it is recommend to put the credentials in the file~/.config/openqa/client.conf
instead which can/should be readable by your normal user you also invokeopenqa-clone-job
oropenqa-clone-custom-git-refspec
with.
yes, this is fine with ~/.config/openqa/client.conf
, thanks!
Updated by mkittler about 1 year ago
- Status changed from Feedback to Resolved
Ok, good. So I'm resolving this ticket.