Gitkraken Configured Ssh Key Is Invalid



Hot questions for Using GitLab in gitkraken

Question:

Create a link between your Git commit and a Jira issue by including the issue key into the commit comment. Commits are then associated to the Jira issue, see the commit author, view code diffs and git notes. Paste the Private SSH key on the provided box or click Upload Key File to upload a private SSH key file. Enter the Passphrase of the private SSH key, if any. Otherwise, leave it blank. The connected repository is listed in the git configuration page.

So, in addition to GitKraken won't let me clone from a private repo on GitHubI get this screen when opening my GitLab Repo:

Anyone got a solution of how to make my Repo 'non-private' or how to make GitKraken let me open this without the Pro Plan?

Already tried:

  • Generating new SSH Key in GitKraken
  • Removing Repo, Generate new GitLab connection, Clone Repo
  • Checked GitLab: GitKraken is an Authorized applications
  • Git Pull via command line gives no trouble, so no permission issue
  • ..

Thanks!

Hifi

Answer:

I had the same problem, this what I found:

They say, and I quote -

This was a licensing change we made 3 months ago. When we made the change, we gave all existing users a 3 month free trial, which are all expiring this week. Sounds like yours is one of them

BTW worth noting that if you're a student, you can use GitKraken for free:https://www.gitkraken.com/student-resources

Hope it helps.

Question:

I've been having a hard time getting the auth to work with ssh keys (don't want to be prompted for user and pass every time). Configuration options / tutorials for this issue are scarce/nonexistant.

Here is the setup:

  • I believe the repo from Gitlab was added with https, can't find a way to change this, don't know if it's important.

  • I'm running Windows 10 with git-bash and have followed the tutorial on Github to generate the keys and add them to the ssh-agent. Added the public one to my gitlab profile and can 'ssh -T git@gitlab.com' successfully.

  • Have messed around with the profile inside .gitkraken and changed the paths for the ssh keys to: 'useLocalAgent': true, 'privateKey': 'C:Usersmendo.sshid_rsa', 'publicKey': 'C:Usersmendo.sshid_rsa.pub'.
  • When I do a pull I'm always prompted to insert the username and pass (even though I started the ssh-agent process from the git-bash).

Don't know how I can solve this so any help you guys can provide will be much appreciated.Also, can't find a single way in app or online to remove/delete a repository from the app (I hope it's not obvious and I'm making a fool of myself).

Thanks in advance for your help!

Best,Diogo

Answer:

If the repo was cloned with HTTPS then no changes to SSH settings will work. You will first have to change the URL for your remote. Luckily you can do this inside GitKraken.

First you should navigate to your repo in GitKraken.

  1. In the left panel expand the remote group (represented by a cloud).This panel may be hidden, if so you'll need to click the right facing arrow symbol that should appear under the folder icon in the top left.

1

  1. With the remote group expanded you should see a source called Origin. Hovering over this item reveals a vertical '..', that is the options button.
  1. Click options and select 'Edit Origin'. This will open a sub-window that that will have two text boxes you can edit. The push and pull urls. switch these from https://gitlab.com/user/repo.git to git@gitlab.com:user/repo.git

Once these steps are done then you can start changing GitKraken's ssh settings. In Windows if you aren't using Pagent (from PuTTY) then you shouldn't select 'use local agent' in GitKraken. Without Pagent you can only use one key at a time and change the settings when you need to change keys.

If you wanted to use the command line to change the URL you can run the git-bash equivalent to git remote set-url git@gitlab.com:user/repo.git from within the repo's root directory.

Gitkraken malformed url

PS: Sorry that I can't embed images directly into my answer, not enough karma for that yet. Same for extra links.

Question:

I would like to integrate my GitLab account with GitKraken through the Preferences>Authentication>Connect to GitLab feature in GitKraken. However this redirects to GitLab.com and my GitLab account is provided through my unversity at gitlab.tubit.tu-berlin.de. Using my university credentials at gitlab.com doesn't work and I can't figure out how to integrate the version of GitLab available through my university with GitKraken. Any help would be appreciated.

Answer:

Based on that URL, I strongly suspect that your university is using a self-hosted instance of GitLab. According to their Twitter account, as of March 10, 2017, GitKraken does not support self-hosted GitLab instances.

Question:

I have two 'disconnected' branches in GitKraken, which I cannot merge together. When I am checked out in one branch, I cannot right-click on the other one. Pushing/pulling to/from the server does not resolve anything. Is there any way to fix this?

I am not sure what my steps were to get to the problems, but it was roughly like this:

  • Create git-repo locally
  • make some edits, initialize Git Flow, et cetera.
  • Made the decision to add an remote location, on Gitlab
  • Created a new repo there
  • First commit on master (included a README.md because I was unsure how to push from GitKraken to an empty repo)
  • Pulled master from GitKraken
  • Pushed develop to Gitlab

Answer:

I solved it by going to Gitlab, and make a pull request from develop to master there (and accept it). Fetching and pulling in GitKraken makes sure they are connected (as seen in the below picture).

Question:

I am a totally noob in GIT. I cloned a repo from a project in Gitkraken, which is connected to GitLab.My question is: If I delete the repo at my PC's folder, would it affect the repos at the others PC's? I am little feared that I can delete the whole project from the other computers.

Thank you very much if you can help me

Answer:

no, by deleting a local folder in the git repository you only delete it locally.

However, if you commit the changes and push them to the upstream repo on the server, the deleted files will only be accessible through older states of the git repository.

I recommend a good read of some git tutorials and how synchronization in git works.

Question:

I want to connect to my school gitlab (self-hosted) with gitkraken.It create the repo when i try to init but a few second later i get this error :

failed to connect to (school.gitlab.url) invalid argument

I'm on win7 x64

gitkraken v4.0.5

  • I'm connected to the gitlab on gitkraken and my SSH key is good.

  • I also try to desactivate my firewall but no change.

Can someone help me please?

Gitkraken configured ssh key is invalid how to

Answer:

I would set up a proxy, that fixed it for me. On windows:Press win keyType proxy settingsTurn on use a proxy serverType in IP and port (google free proxies to find one)Press saveGitKraken should detect the proxy

Working with SSH Keys

SSH keys are required in order to provide secure connection with the remote git host specified in the Repository Origin field which can be accessed via Connect to Git Repository or in Edit repository/integration settings). The Git Integration for Jira app uses one set of keys for accessing all configured repositories.

Follow this guide if you are one of the users who wre limited to or wanted to use SSH to securely connect to your git repositories.

Introduction

There are two options available for specifying SSH keys:

  • SSH keys stored on server filesystem. The keys are located in the home folder of the user which account is used to run Jira. This option provides better compatibility with installation of the previous versions of the Git Integration app. This option does not support passphrases.
  • SSH keys are stored in the app configuration. The keys are added using the Git Integration app configuration. This option supports passphrases.
Features such as branch and pull/merge request creation is only available to repositories/git hosts that were connected via the Auto-connect integration.

Getting Started

Before connecting repositories via SSH, users are required to generate SSH keys for use with the remote git host (public key) and for Git Integration app in Jira (private key).

Generated SSH keys always come in pair. (Example:id_rsa.pub and id_rsa)

For establishing safety connection with SSH, upload a public key to the SSH server and set the private key to the SSH client.

Ssh

In this case, the SSH server is the Git server and the SSH client is the Jira server. Therefore:

  • Git server — public key
  • Jira server — private key (Git Integration for Jira > SSH Keys)
The developer's local system should not have the same private key.
Note that Git Integration for Jira app SSH keys:
  • must not be created using the OpenSSH format.
  • must be the private key.
  • must use the supported certificate format: RSA.
  • must use the supported storage format: OpenSSL PEM.
For more information, see issue SSH key format is invalid.
Windows

For Windows, we recommend to use PuTTY and use PuTTYgen to generate public and private SSH keys.

  1. Launch PuTTYgen and refer to the above image for the rest of the steps on this section.
  2. Set Type of key to generate to RSA.
  3. Set Number of bits in a generated key to 4096.
  4. Click Generate.
  5. Follow screen instructions such as moving your mouse pointer on random locations on the blank area of the PuTTYgen dialog. Do this until the progress bar completely fills up and the SSH key pair is generated.
  6. Entering a Passphrase for the generated key is optional but will ensure a more secure connection.
  7. Save your generated public and private key to a file by clicking the respective options.
  8. Copy the generated key. This is the public key that you will be using on the SSH configuration page of your git host.
  9. For the private key, see the note below.
PuTTY creates a private key in its own '.ppk' format. To convert it to '.pem', the user should do the Conversions > Export OpenSSH key menu option in PuTTYgen. Add/upload this file to Git Integration for Jira app > SSH keys or when prompted on connecting SSH git repositories in Jira.

You can also use the git bash command line to generate SSH key pair. For detailed information, see Generate SSH via Git bash.

Read on the section Generating SSH Keys and follow specific information for the git host and platform that you use.

Linux/MacOS

On Linux and MacOS, this generates an SSH key in RSA format:

MacOs often incorrectly creates an OpenSSH format certificate. For more details, see information on this common problem.

Generating SSH Keys

Configure and generate SSH keys for the following git hosting systems by following the reference links on each sub-section:

Beanstalk
  • For MacOS, see Working with Git on MacOS .
  • For Windows, see Working with Git on Windows .
  • For Linux, see Working with Git on Linux .
Bitbucket
  • For MacOS/Linux, see Setting up SSH for Git on MacOS/Linux .
  • For Windows, see Installing or Upgrading Git - Step 1 then Set up SSH for Git .
Gerrit
By v2.6.1 of the Git Integration for Jira app, the Gerrit web linking support is added.
  • For information about Gerrit software, see Gerrit Software Wiki and Gerrit at Code Review .
  • For general reference and installation, see Gerrit documentation . Ubuntu installation and fixing registration error .
  • For information on SSH on Gerrit, see SSH and Gerrit .
  • For details on User Change-Ids, see Change-Ids in Gerrit .
GitBlit
  • For information about Gitblit, see GitBlit .
  • For general reference and installation, see GitBlit Configuration , Using HTTP/HTTPS Transport and Built-in Authentication .
  • For information on SSH on GitBlit, see GitBlit: Using the SSH Transport .
  • For GitBlit related FAQ, see GitBlit Frequently Asked Questions .
GitHub
  • For MacOS, see Generating SSH Keys on MacOS .
  • For Windows, see Generating SSH Keys on Windows .
  • For Linux, see Generating SSH Keys on Linux .
GitLab
  • See reference, Installing Git for MacOS/Windows/Linux .
  • For creating SSH keys, see Generating SSH Public Key . Also see the video demonstration here .
GitLab CE/EE
Follow the above GitLab references for GitLab CE/EE. Then verify that your GitLab server should have the following SSH settings:
  • Enabled Git access protocols -- Both SSH and HTTP(s)
  • RSA SSH keys -- Are allowed
Other SSH key formats may be supported by Git Integration for Jira app, but prefer to use RSA format for your SSH git connections.
Git-scm
  • See reference, Installing Git for MacOS/Windows/Linux .
  • For creating SSH keys, see Connecting to GitHub with SSH .
Gitolite
  • For full reference and installation, see All About Gitolite .
  • For information on SSH on Gitolite, see SSH and Gitolite .
  • For details on user key management, see Managing User Keys in Gitolite .
VSTS/TFS/Azure DevOps/Azure Repos
The SSH support starts with TFS 2013 and later versions.
  • For information about TFS/Azure DevOps Server, see MS Team Foundaton Server .
  • For general reference and terms, see Git Experience Futures .

For generating SSH keys for Azure Repos (which is applicable to MS git hosts), follow instructions at Use SSH Key Authentication.

Users can use HTTPS or SSH to securely connect to git repositories. HTTPS connections will require the user's login credentials, while SSH connections will require SSH keys.

Adding a Private SSH Key (Jira Server)

  1. From your Jira dashboard menu, go to Git > Manage (Git) repositories. On the sidebar under Git Integration for Jira, select SSH Keys.
  2. Alternatively, go to Jira Administration > Applications. On the sidebar under Git Integration for Jira, select SSH Keys.
  3. Click Add SSH Key. The following screen is displayed.
  4. Utilize the following options for adding the new SSH key:

    OptionDescription
    Key nameEnter a meaningful name for this private SSH key as required.
    Private keyThis is the actual private SSH key.
    Upload the private key file via Browse.. or paste the generated private key into the provided field.
    PassphraseOptional. Enter the passphrase that was assigned to this private key.
  5. Click Add to complate this setup.

Adding an SSH Public Key

Add a public SSH key to your remote git host to prepare its repositories for connection with the Git Integration for Jira app. Ssh
  1. Login to your remote git host.
  2. Go to the SSH configuration page, if supported.
  3. Paste the public key to the provided box and complete the setup.

SSH Keys Configuration (Jira Server)

Manage and associate SSH keys to connected git repositories via the SSH Keys in Git Integration for Jira Server app repository configuration page.

The list of added private SSH keys is accessible on this page. Both types of SSH keys are displayed in this list. Legacy filesystem-based keys contain directory path in the Private key column.

Refer to the following table for list column information:

ColumnDescription
NameThe name of the private SSH key will appear here.
Private keyThis is the private SSH key in hex mode.
PassphraseA lock icon is displayed if the SSH key pair has a passphrase.
AssociationsLists the repositories that are associated with this SSH key.
Last Used ByLists the repositories that are using this SSH key.
OperationsClick the icon to perform Delete or Associations functions.
You cannot delete filesystem-based keysfilesy using the Git Integration app configuration.
The SSH keys are also automatically added to this list when adding new repositories that require SSH keys.

Adding and Associating SSH Keys

Limit the usage of the SSH key by associating them to selected repositories. As of v2.6.9 of the Git Integration for Jira app, the option to strictly map keys to repositories is available.

On the SSH Keys page, click Actions > Associations for the selected SSH key.

The following screen is displayed:

Mark the required repository or repositories to associate the SSH key.

Clicking the Select All text label marks all repositories that will be associated to this SSH key.

Clicking the Select None text label deselects all repositores.

Bitbucket Ssh Key

Click Save to save the settings.

If an SSH key is strictly associated with some repository, that SSH key is an associated key.

If you have multiple repositories that uses the same SSH key, configure them via Git Integration app by doing the following steps:

  1. Configure a repository that requires an SSH key via Add Repository Wizard.
  2. Associate that SSH key with the currently configured repository via SSH Keys.
  3. Add another repository that requires the same SSH key. You will be presented with the following screen:
  4. Select the SSH key that you have associated to the previously added repository from the Existing key list.
  5. Click Next to continue. Complete the wizard and add another repository as desired.

For third-party products or services (such as GitHub, GitLab, Bitbucket, etc.), register the PUBLIC KEY for target repository or in profile settings of your git account.

For custom git hosting servers, ask your administrator to check that the target keypair's PUBLIC KEY is added into the authorized_keys file of the git server. For more information, see the following article: https://git-scm.com/book/it/v2/Git-on-the-Server-Setting-Up-the-Server.

Removing SSH Keys

SSH keys cannot be modified or updated. To change the keys, remove and add them again.

If the key is deleted, all repository references will also be removed. Repositories that don't have the key associated to them will use the common keys by default.

Reconfigure Git Repository and SSH Key

Configured Ssh Key Is Invalid Gitkraken Windows

Perform the following steps to reconfigure repositories and SSH key:

  1. Remove any old SSH keys configured with the Git Integration app via <JiraHOSTNAME> /secure/ViewSshKeys.jspa
  2. Restart Jira.
  3. Get the following file from your Jira server to your Windows workstation: /home/jira/.ssh/id_rsa
  4. Set up the git repository in Jira using the repository location and upload the private key that was downloaded above.

Gitkraken Multiple Azure Devops Accounts

For multiple repository configuration, see Bulk Change.

Connecting SSH Git Repositories (Jira Cloud)

SSH git repositories can be integrated with Jira Cloud via Git Integration for Jira app.

  1. Generate an SSH key pair. We recommend to generate a 4096-bit key.
  2. Obtain the Clone SSH git URL from your git host repository page.
  3. On your Jira Cloud dashboard, go to menu Git > Manage Git repositories.
  4. On the Auto-connect integration panel, click Git.
  5. Paste the clone URL into the Remote Git URL field.
  6. Click Next.
  7. Click Connect.
  8. Paste the Private SSH key on the provided box or click Upload Key File to upload a private SSH key file.
  9. Enter the Passphrase of the private SSH key, if any. Otherwise, leave it blank.
  10. Click Connect.

The connected repository is listed in the git configuration page.

Gitkraken Configured Ssh Key Is Invalid Format

For Jira Cloud integration, we recommend to use the Auto-connect integration panel for connecting git repositories. It supports multiple git repository connections and provides additional features that are not present in SSH integration.