title: Get à 401 Unauthorized when trying to lint my gitlab-ci.yml (version 13.8)
body: <p>Since monday, I'm not able to use the lint CI API from gitlab, which is documented here <a href="https://docs.gitlab.com/ee/api/lint.html#validate-the-ci-yaml-configuration" rel="nofollow noreferrer">https://docs.gitlab.com/ee/api/lint.html#validate-the-ci-yaml-configuration</a></p>
  <p>I'm working on a self hosted gitlab, and we updated gitlab to the last version (13.8.4).</p>
  <p>I've noticed that the documentation has changed between 13.8 and 13.9, they mentioned</p>
  <blockquote>
  <p>Access to this endpoint requires authentication.</p>
  </blockquote>
  <p>So I tried to generate a personal access token with full access (I'm admin), but I still get a 401.</p>
  <p>Here is my try :</p>
  <pre class="lang-sh prettyprint-override"><code>$ curl --header &quot;Content-Type: application/json&quot; --header &quot;PRIVATE-TOKEN: P3r50Na1t0k3N&quot; &quot;https://my-domain.artips.fr/api/v4/ci/lint&quot; --data '{&quot;content&quot;: &quot;{ \&quot;image\&quot;: \&quot;ruby:2.6\&quot;, \&quot;services\&quot;: [\&quot;postgres\&quot;], \&quot;before_script\&quot;: [\&quot;bundle install\&quot;, \&quot;bundle exec rake db:create\&quot;], \&quot;variables\&quot;: {\&quot;DB_NAME\&quot;: \&quot;postgres\&quot;}, \&quot;types\&quot;: [\&quot;test\&quot;, \&quot;deploy\&quot;, \&quot;notify\&quot;], \&quot;rspec\&quot;: { \&quot;script\&quot;: \&quot;rake spec\&quot;, \&quot;tags\&quot;: [\&quot;ruby\&quot;, \&quot;postgres\&quot;], \&quot;only\&quot;: [\&quot;branches\&quot;]}}&quot;}'
  
  # Result : {&quot;message&quot;:&quot;401 Unauthorized&quot;}
  
  # Other try
  
  $ curl -X POST --header &quot;Content-Type: application/json&quot; --header &quot;PRIVATE-TOKEN: P3r50Na1t0k3N&quot; &quot;https:///my-domain.artips.fr/api/v4/ci/lint&quot; --data '{&quot;content&quot;: &quot;{ \&quot;image\&quot;: \&quot;ruby:2.6\&quot;, \&quot;services\&quot;: [\&quot;postgres\&quot;], \&quot;before_script\&quot;: [\&quot;bundle install\&quot;, \&quot;bundle exec rake db:create\&quot;], \&quot;variables\&quot;: {\&quot;DB_NAME\&quot;: \&quot;postgres\&quot;}, \&quot;types\&quot;: [\&quot;test\&quot;, \&quot;deploy\&quot;, \&quot;notify\&quot;], \&quot;rspec\&quot;: { \&quot;script\&quot;: \&quot;rake spec\&quot;, \&quot;tags\&quot;: [\&quot;ruby\&quot;, \&quot;postgres\&quot;], \&quot;only\&quot;: [\&quot;branches\&quot;]}}&quot;}'
  
  # same result: {&quot;message&quot;:&quot;401 Unauthorized&quot;}
  
  
  </code></pre>
  <p>Has anyone run into the same problem ?</p>
  <p>Thanks in advance</p>
  <p>Takeshi</p>