title: Adding SSH-key through curl: Fingerprint cannot be generated
body: <p>I'm writing an bash script that will add an <code>SSH-key</code> to an in-house Gitlab server. Below is the code:</p>
  
  <pre><code>userToken=$(curl http://gitserver/api/v3/session --data 'login=*****&amp;password=****' | jq '.private_token')
  userToken=$(echo "$userToken" | tr -d '"')
  
  # Below key is for testing, will use output of cat ~/.ssh/id_rsa.pub later on
  sshKey="ssh-rsa AA*********L ****@***com"
  
  curl --data "private_token=$userToken&amp;title=keyName&amp;key=$sshKey" "http://gitserver/api/v3/user/keys"
  </code></pre>
  
  <p>But I get this response:</p>
  
  <pre><code>{
    "message": {
      "fingerprint": [
        "cannot be generated"
      ]
    }
  }
  </code></pre>
  
  <p>But when I mannualy insert the same key through the webbrowser, everything is just working fine...</p>
  
  <p>So what am I doing wrong? Do I miss an option?</p>