Kerberos credentials and Use both colons and single quotes in a script

I want to add a pidcalib2 test to a pipeline, but it need a Kerberos ticket to access CERN EOS. I try to use keytab, but failed as Pre-authentication failed.

$ lb-conda pidcalib pidcalib2.make_eff_hists --sample Turbo16 --magnet down --particle Pi --pid-cut “MC15TuneV1_ProbNNpi > 0.1 & DLLK < -2” --cut “PT>250 & TRACK_GHOSTPROB<0.5 & ETA>2 & ETA<4.9 & P>3200 & P<150000 & HasRich==1” --bin-var P --bin-var ETA --bin-var nSPDhits --output-dir pidcalib_output

[I 211028 15:05:37 make_eff_hists:179] Running PIDCalib2 make_eff_hists with the following config:

[I 211028 15:05:37 utils:116] ===============

[I 211028 15:05:37 utils:119] sample : Turbo16

[I 211028 15:05:37 utils:119] magnet : down

[I 211028 15:05:37 utils:119] particle : Pi

[I 211028 15:05:37 utils:119] pid_cuts : [‘MC15TuneV1_ProbNNpi>0.1&DLLK<-2’]

[I 211028 15:05:37 utils:119] cuts : [‘PT>250 & TRACK_GHOSTPROB<0.5 & ETA>2 & ETA<4.9 & P>3200 & P<150000 & HasRich==1’]

[I 211028 15:05:37 utils:119] bin_vars : [‘P’, ‘ETA’, ‘nSPDhits’]

[I 211028 15:05:37 utils:119] output_dir : pidcalib_output

[I 211028 15:05:37 utils:119] verbose : False

[I 211028 15:05:37 utils:119] version : 1.0.1

[I 211028 15:05:37 utils:120] ===============

[I 211028 15:05:37 utils:450] Branches to be read: {‘sWeight’: ‘probe_sWeight’, ‘MC15TuneV1_ProbNNpi’: ‘probe_MC15TuneV1_ProbNNpi’, ‘DLLK’: ‘probe_PIDK’, ‘P’: ‘probe_P’, ‘ETA’: ‘probe_ETA’, ‘nSPDhits’: ‘nSPDhits’, ‘PT’: ‘probe_PT’, ‘TRACK_GHOSTPROB’: ‘probe_TRACK_GHOSTPROB’, ‘HasRich’: ‘probe_hasRich’}

[I 211028 15:05:37 utils:451] 258 calibration files from EOS will be processed

Processing files: 0%| | 0/258 [00:00<?, ?it/s][E 211028 15:05:37 pid_data:391] Permission denied; do you have Kerberos credentials? Try running ‘kinit -f [USERNAME]@CERN.CH

Traceback (most recent call last):

Another question is the special characters with script, I want to use this script in CI/CD job:

lb-conda pidcalib pidcalib2.ref_calib --sample Turbo16 --magnet down --ref-file data/ref.root --histo-dir pidcalib_output --bin-vars ‘{“P”: “P”, “ETA”: “ETA”, “nSPDhits”: “nSPDHits”}’ --ref-pars ‘{“piplus”: [“Pi”, “MC15TuneV1_ProbNNpi>0.1&DLLK < -2”]}’ --output-file 2016md_Pi_eff.root

GitLab CI/CD script syntax docs(GitLab CI/CD script syntax | GitLab) tells me to change single quotes to double quotes and wrap the entire command in single quotes, but the single quotes are needed in this command as well.

Any tips on Kerberos credentials and the special characters would be greatly appreciated.