Gitlab integration via https

Abdoulaye
Abdoulaye Dataiku DSS Core Designer, Registered Posts: 45 ✭✭✭✭✭

Hello, I've setup git https configuration (by login in ssh mode to my ec2 instance that run dataiku).

I've created a token then added it in gitconfig with the rightsthings. This setup work as I tested cloning a project.

In dataiku interface, I've issue when try to add remote repositoy. What the issue here?

de.png

Not authorized

Remote Git usage is forbidden for auth=xxxx.xxx@xxxx.xxx, remoteURL=https://gitlab.xxxxx.com/xxx/xx/x/x-xx.git

Screenshot 2024-05-03 at 13.06.52.png

Screenshot 2024-05-03 at 13.06.23.png

Best Answer

Answers

  • Alexandru
    Alexandru Dataiker, Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 1,215 Dataiker

    Hi @abdoulaye
    ,

    This would usually show because URL you are trying doesn't match the regex expression, can you try with .* as test and check on regex101 to make sure your regex is valid?

    Thanks


  • Abdoulaye
    Abdoulaye Dataiku DSS Core Designer, Registered Posts: 45 ✭✭✭✭✭
    edited July 17

    I've set .* for test.

     An error happened while adding a remote
    An error happened while adding the following remote: origin (https://gitlab.xxx-xxx.xxx/xxx/xxx/xxx/xxx-xxx.git),
    and then fetching it, caused by: IOException: Process failure, caused by: IOException:
    Process execution failed (return code 1) (error=remote: HTTP Basic: Access denied.
    The provided password or token is incorrect or your account has 2FA enabled and you must use a personal access token instead of a password. See https://gitlab.xxx-xxx.xxx/help/topics/git/troubleshooting_git#error-on-git-fetch-http-basic-access-denied fatal: Authentication failed for 'https://gitlab.xxx-xxx.xxx/xxx/xxx/xxx/xxx-xxx.git/' error: Could not fetch origin )
  • Turribeach
    Turribeach Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023 Posts: 1,987 Neuron
    edited July 17

    Try with this expression:

    .*/gitlab.xxxxx.com/xxx/.*
  • Abdoulaye
    Abdoulaye Dataiku DSS Core Designer, Registered Posts: 45 ✭✭✭✭✭

    The .* should work but it throw error.

  • Turribeach
    Turribeach Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023 Posts: 1,987 Neuron

    What error do you get?

  • Abdoulaye
    Abdoulaye Dataiku DSS Core Designer, Registered Posts: 45 ✭✭✭✭✭

    I got this error in screenshot. I use https url when I click add remote.

    I'm my first message post why the window popup request Remote url as ssh url?

    which user is used when doing this remote git (pull/fetch/push). Is it the one we use when login to instance via ssh?

    Screenshot 2024-05-03 at 19.21.52.png

  • Turribeach
    Turribeach Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023 Posts: 1,987 Neuron

    This is a different error so it's an authentication issue now. Always post the errors you get, "throws an error" is not very useful to people trying to help you. SSH authentication is different than HTTPS authentication so you need to use the correct authentication tokens in each case. For HTTPS you need to generate your personal access token in Gitlab:

    https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html

  • Abdoulaye
    Abdoulaye Dataiku DSS Core Designer, Registered Posts: 45 ✭✭✭✭✭

    I'm not doing ssh connection. As said https token is correct and working correctly when test vhia login to host using ssh

    Dataiku don't give clear doc about setting up https connection, seem here to none never set this.

  • Turribeach
    Turribeach Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023 Posts: 1,987 Neuron

    @abdoulaye
    wrote:

    I'm not doing ssh connection. As said https token is correct and working correctly when test vhia login to host using ssh


    You say you are not doing SSH connection then you say you "tested via login to host using ssh" using an HTTP token. This is not possible. Either you use SSH keys via SSH or you use HTTPS with personal access tokens. I am not sure why you keep bringing SSH into this thread since you are trying to setup HTTPS.

  • Abdoulaye
    Abdoulaye Dataiku DSS Core Designer, Registered Posts: 45 ✭✭✭✭✭

    I restart

    When you use dataikucloudstack(aws) the only way to interact with systems file is to log into the ec2 instance that run the DSS designer: this this done via ssh login (thi ssh is not for git it for login to host). Then to setup git there is two way to do that:

    - 1 https (I use this)

    - 2 ssh (i do not use this)

    I use 1 and ~/.gitconfig at I setup this file with the tokens from gitlab.

    You got it why I say ssh?

Setup Info
    Tags
      Help me…