HiromuHota / pdi-git-plugin

SpoonGit allows you to manage versions of local Kettle files without leaving Spoon. In addition to Git, Subversion is also supported.
Apache License 2.0
29 stars 12 forks source link

Base64 error when trying to push or pull #10

Closed Nanabell closed 4 years ago

Nanabell commented 6 years ago

I get an error when trying to push or pull from existing repos with ssh. i havent tested cloning as i already have the repo locally. But when trying to push or pull i get the error:

fromBase64: invalid base64 data

when i start pdi as admin i dont get this error but the UnknownHostKey error which was already explained on your FAQ but nothing we tried there solved this issue.

HiromuHota commented 6 years ago

Thank you @Nanabell for reporting this issue, but I need more information to figure out what went wrong. Namely,

Also please tell me the following information:

HiromuHota commented 6 years ago

I was able to reproduce the same error message when I corrupted the ~/.ssh/known_hosts as follows (GitHub.com in this example):

Correct:

github.com,192.30.253.112 ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==

Wrong (I removed the trailing double equal signs (==)):

github.com,192.30.253.112 ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ

Please check your knownhostkey is correct.

Nanabell commented 6 years ago

Some General Information: OS: Windows 10 Oracle Java build 1.8.0_151-b12 PDI 8.0.0.0-28 - EE SpoonGit 1.0.0

Remote Host ssh://git@host/repository.git (private bitbucket server) And I can use any other client to successfully pull push or clone, for example, Sourcetree, Gitkraken, or even the windows git bash

Regarding your fix to add/ not remove the trailing ==. In my key, I never had any trailing = and when adding them I get a new error with the message

HostKey has changed: [host]:port
HiromuHota commented 6 years ago

I deployed an private BitBucket Server locally and tested myself using ssh://git@localhost:7999/test/test.git. My environment is almost the same as yours except (OS: Mac OS X (10.12.6), PDI 8.0.0.0-28 - CE) and I encountered the same error.

I haven't figured out what was wrong yet, but I found a work-around.

  1. Remove the known_hosts file (~/.ssh/known_hosts for *nix) or backup the file
  2. Fetch/Pull/Push using other Git clients to create a new known_hosts file and to add HostKey of your bitbucket server
  3. You will be able to pull & push against your private BitBucket server using SpoonGit.
HiromuHota commented 6 years ago

Another finding is related to the equal sign =.

Case 1: Works neither for GitHub nor for private BitBucket

github.com,192.30.253.112 ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ
[localhost]:7999 ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAzQHks//dlkVfi3cUj0icgLKo2LOZzOtmvjhoX4gM9mddXY7A9jBAwm5t2HR3P084BrT38ly3sU3zSfItMPQ8Vlf7gBYqZSbbXEQRdBLA2dVhHuBdRwWaSTceNTdYoAqBvXw1xFOenmAwwxjLarQ4yRjUTtCYOfewRJLsIR4NHm0INHDcerOxEDeDkxWE/BjQGVeQ8GGWs/E7c4e+FWIIz4KGVrKNqCzETfJz6MPps8zVvCUGZ5tPwUCwnZdCzI6ejhvmPkGjjk8SKxfya6/6ejZbqXXP6TMiibrer/u5eWxf4lgrSxU0g48ol/uHnxeY+7BTKeWpjlPHkTUXCRHp

Case 2: SpoonGit works for both GitHub and local BitBucket (added double equal sign for GitHub.com)

github.com,192.30.253.112 ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==
[localhost]:7999 ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAzQHks//dlkVfi3cUj0icgLKo2LOZzOtmvjhoX4gM9mddXY7A9jBAwm5t2HR3P084BrT38ly3sU3zSfItMPQ8Vlf7gBYqZSbbXEQRdBLA2dVhHuBdRwWaSTceNTdYoAqBvXw1xFOenmAwwxjLarQ4yRjUTtCYOfewRJLsIR4NHm0INHDcerOxEDeDkxWE/BjQGVeQ8GGWs/E7c4e+FWIIz4KGVrKNqCzETfJz6MPps8zVvCUGZ5tPwUCwnZdCzI6ejhvmPkGjjk8SKxfya6/6ejZbqXXP6TMiibrer/u5eWxf4lgrSxU0g48ol/uHnxeY+7BTKeWpjlPHkTUXCRHp

Case 3: This is slightly different from case #2, but another working case

github.com ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==
[localhost]:7999 ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAzQHks//dlkVfi3cUj0icgLKo2LOZzOtmvjhoX4gM9mddXY7A9jBAwm5t2HR3P084BrT38ly3sU3zSfItMPQ8Vlf7gBYqZSbbXEQRdBLA2dVhHuBdRwWaSTceNTdYoAqBvXw1xFOenmAwwxjLarQ4yRjUTtCYOfewRJLsIR4NHm0INHDcerOxEDeDkxWE/BjQGVeQ8GGWs/E7c4e+FWIIz4KGVrKNqCzETfJz6MPps8zVvCUGZ5tPwUCwnZdCzI6ejhvmPkGjjk8SKxfya6/6ejZbqXXP6TMiibrer/u5eWxf4lgrSxU0g48ol/uHnxeY+7BTKeWpjlPHkTUXCRHp

I didn't know, but my known_hosts file contained two keys for GitHub.com starting from github.com,192.30.253.112 and github.com. The first one (github.com,192.30.253.112) didn't have the equal sign at the end of the key, but the second one had.

So in addition to the 1st work-around described above, the 2nd work-around would be

  1. Look at the known_hosts and find a knownhost without any number of equal sign at the end of their key.
  2. Add one or two equal signs to those found knownhosts
HiromuHota commented 4 years ago

Close for inactivity. Feel free to reopen it if an issue persists.