Setting up Talend 6.2 with Bitbucket and SSH

Talend Version          6.2.1

Summary

Setting up Talend 6.2 with Bitbucket and SSH.
Additional Versions  
Key words SSH, bitbucket
Product Talend Data Integration
Component Talend Administration Center
Article Type Installation
Problem Description  
Problem root cause  
Solution or Workaround

Requirements:

  • Git Bash or Git client (if using Windows to house your TAC; needed to create an SSH key)

  • Bit Bucket

  • Talend 6.2

Setting up Git

  1. From the Git Bash window, verify if it is able to create an RSA key.

    ssh -v

    The output should be something like this:

    ssh_v.png

     

  2. Next, list the contents of the ~/.ssh directory by typing ls –a ~/.ssh.

    If you don’t have an ~/.ssh directory yet, you will see something similar to “No such file or directory." This is fine, because in the next step, you will create an .ssh folder as well as id_rsa, id_rsa.pub, and known_hosts files.

    no_file.png

     

  3. Type ssh-keygen. You will be prompted to save the key in the default location (c:\Users\username\.ssh\id_rsa).

    There is no need for a passphrase, but you can enter one if desired. The complete command will look like this:

    keygen.png

     

  4. Now that you have your RSA key pair, the directory should look similar to this:

    ssh_dir.png

    Note: The files other than id_rsa and id_rsa.pub will be created later.

  5. Create an SSH config file and add these lines:

    Host bitbucket.org
     IdentityFile ~/.ssh/id_rsa

    Important: There is one space before IdentityFile, do not delete it.

  6. Go to gitbash and type ssh –T git@bitbucket.org to add bitbucket and create a known_hosts file.

    Note: If you are using git 2.10 on Windows, there is an issue with ssh-agent meaning it will not start automatically.

    1. To start it in gitbash, type ssh-agent -s.

    2. Type eval $(ssh-agent).

    3. Type ssh-add –l. This should state that you have no identity.

    4. Add an identity by typing ssh-add ~/.ssh/id_rsa.

    5. Run ssh-keygen to overwrite the id_rsa file. Your ssh-agent was not running when the previous file was created, so an improper key may have been generated as a result.

  7. From Bitbucket, click your avatar > Bitbucket settings.

    avatar.png

     

  8. Scroll down to the SSH keys portion in the Security tab.

    security_tab.png

     

  9. Perform a cat command on the id_rsa.pub file:

    cat ~/.ssh/id_rsa.pub

    cat.png

     

  10. Copy the contents of the id_rsa.pub file and place it into the Add key portion of the SSH keys tab in Bitbucket. Click Save.

    ssh_keys.png

    Congratulations! Git is now set up for use with SSH. The next steps will connect the TAC.

     

Connecting the TAC

  1. Create a new Bitbucket repository.

    repo.png

     

  2. Expand the I’m starting from scratch section, then copy the Git URL shown after git remote add origin, in this case:

    git@bitbucket.org:arthur-talend/bitbucket-test.git

    scratch.png

     

  3. Create a new repository in TAC, enter the correct details (including the URL you just copied), check the connection, and then click Save.

    success.png

     

  4. Refresh your repository page for the Bitbucket repo; it should look a little different now.

    newrepo.png

    Note: Notice the SSH URL and the Branch and Watcher.

  5. Log into Studio (remember to give your user the right credentials as well as project authorizations).

  6. Go to the source tab within Bitbucket, then click your repository. Notice that the structure now looks like that of a correct Talend repository.

    repo_structure.png

     

Caution

Note: Talend 6.1.1 and Bitbucket on SSH does not work. Talend supports Bitbucket starting in 6.2.1 and thus it is not possible to set up 6.1.1 with SSH in Bitbucket, only HTTPS. If you try to set up Bitbucket, SSH, and Talend 6.1.1, you will receive a mismatched protocol error in the console.

JIRA ticket number  
Version history
Revision #:
14 of 14
Last update:
‎07-06-2017 02:08 PM
Updated by: