<p>My gitlab CI pipeline is setup to run maven tests from a docker image created from my maven project.</p>
<p>I have tested the pipeline on my master branch and it worked fine and ran the test.</p>
<p>However I have created a new feature branch and now running the pipeline yet again, however I now get this error</p>
<pre class="lang-sh prettyprint-override"><code>error checking push permissions -- make sure you entered the correct tag name, and that you are authenticated correctly, and try again: getting tag for destination: repository can only contain the runes `abcdefghijklmnopqrstuvwxyz0123456789_-./`: it2901/cs344-maven:feature/produce-allocation-pdf
ERROR: Job failed: command terminated with exit code 1
</code></pre>
<p>I can't seem to pinpoint the problem at all. I have also pushed the tag: <em><code>tut3</code></em> to the feature branch as well.</p>
<p>Here is my .gitlab-ci.yml: <a href="https://controlc.com/7a94a00f" rel="nofollow noreferrer">https://controlc.com/7a94a00f</a></p>

it2901
<p>Based on what you shared, you have this configured:</p>
<pre class="lang-sh prettyprint-override"><code>VERSIONLABELMETHOD: &quot;tut3&quot; # options: &quot;&quot;,&quot;LastVersionTagInGit&quot;
</code></pre>
<p>It should be either:</p>
<pre class="lang-sh prettyprint-override"><code>VERSIONLABELMETHOD: &quot;&quot;
</code></pre>
<p>or</p>
<pre class="lang-sh prettyprint-override"><code>VERSIONLABELMETHOD: &quot;LastVersionTagInGit&quot;
</code></pre>
<p>or</p>
<pre class="lang-sh prettyprint-override"><code>VERSIONLABELMETHOD: &quot;OnlyIfThisCommitHasVersion&quot;
</code></pre>
<p>When you specify <em><code>&quot;tut3&quot;</code></em>, the script takes it as if it was <em><code>&quot;&quot;</code></em> (empty string). Assuming you didn't define <code>$VERSIONLABEL</code> anywhere <code>$ADDITIONALTAGLIST</code> will also be empty.</p>
<p>And later in the code you can see that this gets executed:</p>
<pre class="lang-sh prettyprint-override"><code>if [[ &quot;$CI_COMMIT_BRANCH&quot; == &quot;$CI_DEFAULT_BRANCH&quot; ]]; then ADDITIONALTAGLIST=&quot;$ADDITIONALTAGLIST latest&quot;; fi
</code></pre>
<p>Assuming <code>$CI_DEFAULT_BRANCH</code> is set to <code>master</code> if you use a separate branch <code>mybranch</code> the code above won't get executed so it's likely that the Kaniko command line doesn't have any a neither a valid <code>$FORMATTEDTAGLIST</code> or <code>$IMAGE_LABELS</code>.</p>
<p>You can debug by seeing their output on the script which is happening at the end before calling Kaniko:</p>
<pre class="lang-sh prettyprint-override"><code>...
echo $FORMATTEDTAGLIST
echo $IMAGE_LABELS
mkdir -p /kaniko/.docker
...
</code></pre>
<p>A hack would be to override <code>$CI_DEFAULT_BRANCH</code> with your custom branch.</p>
<p>✌️</p>
