Answers: <p>The stack trace contains org.jenkinsci.plugins.docker.commons.credentials.ImageNameValidator, so this error is for Docker image name validation, not your Git SCM.</p>
  
Answers: CC BY-SA 4.0
Answers: 2022-03-23T15:45:16.827Z
Answers: Thanks, we have an image name generated from a Jenkins parameter. It seems that this feature is now disabled (security issue, I guess). So a `${abc}` is refused by the ImageNameValidator. It is painful that the error message doesn't display the string analysed.
Answers: Sandburg
Answers: CC BY-SA 4.0
Answers: 2022-04-14T14:02:17.270Z
Answers: I could think the problem was the consequence of a security patch not allowing me to inject a docker image name in a variable, but it's that the regex only accepts `'` and not `"`... I think this could be patched in Jenkins code.
Answers: Sandburg
Answers: CC BY-SA 4.0
Answers: 2022-03-22T23:22:31.747Z
Answers: 2022-03-22T23:22:31.747Z
Answers: jayhendren
Body: <p>I receive an error after launching a Jenkins pipeline, but right at the SCM step, configure via the plugin (not by the groovy).</p>
  <p>The message refers to a &quot;Name&quot; wrong spelled, but I can't figure out to which of my fields it is referring.</p>
  <p>I looked to the source code, but it manipulates a concatenation of several inputs...</p>
  <p>This is a git SCM.</p>
  <p><a href="https://i.sstatic.net/01y6S.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/01y6S.png" alt="Jenkins interface" /></a></p>
  <blockquote>
  <p>ERROR: Name must follow the pattern '^[a-zA-Z0-9]+((.|_|__|-+)[a-zA-Z0-9]+)*$' <br/>
   at hudson.util.FormValidation._errorWithMarkup(FormValidation.java:268) <br/>
   at hudson.util.FormValidation.errorWithMarkup(FormValidation.java:254) <br/>
   at hudson.util.FormValidation.error(FormValidation.java:145) <br/>
   at hudson.util.FormValidation.error(FormValidation.java:170) <br/>
   at org.jenkinsci.plugins.docker.commons.credentials.ImageNameValidator.validateName(ImageNameValidator.java:289) <br/>
   at org.jenkinsci.plugins.docker.commons.credentials.ImageNameValidator.validateUserAndRepo(ImageNameValidator.java:115) <br/>
   at org.jenkinsci.plugins.docker.commons.credentials.ImageNameValidator.checkUserAndRepo(ImageNameValidator.java:141) <br/>
   at org.jenkinsci.plugins.docker.commons.credentials.ImageNameValidator$checkUserAndRepo.call(Unknown Source) <br/>
  + 50 lines I can show if needed</p>
  </blockquote>
  
Tags: <jenkins><jenkins-plugins>
Title: Jenkins Git plugin, Error: Name must follow the pattern
UserDisplayName: Sandburg
ThreadText: # Jenkins Git plugin, Error: Name must follow the pattern
  
  (Asked by: username_0 on 2022-03-22)
  
  I receive an error after launching a Jenkins pipeline, but right at the SCM step, configure via the plugin (not by the groovy).
  
  The message refers to a "Name" wrong spelled, but I can't figure out to which of my fields it is referring.
  
  I looked to the source code, but it manipulates a concatenation of several inputs...
  
  This is a git SCM.
  
  [![Jenkins interface](https://i.sstatic.net/01y6S.png)](https://i.sstatic.net/01y6S.png)
  
  > ERROR: Name must follow the pattern '^[a-zA-Z0-9]+((.|\_|\_\_|-+)[a-zA-Z0-9]+)\*$'   
  >  at hudson.util.FormValidation.\_errorWithMarkup(FormValidation.java:268)   
  >  at hudson.util.FormValidation.errorWithMarkup(FormValidation.java:254)   
  >  at hudson.util.FormValidation.error(FormValidation.java:145)   
  >  at hudson.util.FormValidation.error(FormValidation.java:170)   
  >  at org.jenkinsci.plugins.docker.commons.credentials.ImageNameValidator.validateName(ImageNameValidator.java:289)   
  >  at org.jenkinsci.plugins.docker.commons.credentials.ImageNameValidator.validateUserAndRepo(ImageNameValidator.java:115)   
  >  at org.jenkinsci.plugins.docker.commons.credentials.ImageNameValidator.checkUserAndRepo(ImageNameValidator.java:141)   
  >  at org.jenkinsci.plugins.docker.commons.credentials.ImageNameValidator$checkUserAndRepo.call(Unknown Source)   
  > + 50 lines I can show if needed
  
  **Tags:** jenkins, jenkins-plugins
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2022-03-22. Score: 2 | Accepted answer
  
  The stack trace contains org.jenkinsci.plugins.docker.commons.credentials.ImageNameValidator, so this error is for Docker image name validation, not your Git SCM.
  
  > **Comments:**
  > **username_0**: Thanks, we have an image name generated from a Jenkins parameter. It seems that this feature is now disabled (security issue, I guess). So a `${abc}` is refused by the ImageNameValidator. It is painful that the error message doesn't display the string analysed.  
  > **username_0**: I could think the problem was the consequence of a security patch not allowing me to inject a docker image name in a variable, but it's that the regex only accepts `'` and not `"`... I think this could be patched in Jenkins code.  
  
  ---
  
  