Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: check if ssh key has newline at the end #1168

Merged
merged 1 commit into from
Aug 19, 2024
Merged

fix: check if ssh key has newline at the end #1168

merged 1 commit into from
Aug 19, 2024

Conversation

akurinnoy
Copy link
Contributor

What does this PR do?

This PR fixes an issue where the trailing newline was lost when copy-pasting SSH keys.

Screenshot/screencast of this PR

N/A

What issues does this PR fix or reference?

fixes eclipse-che/che#23073

Is it tested? How?

Based on eclipse-che/che#23073 (comment):

  1. Generate an SSH key locally
  2. Go to Dashboard -> User Preferences -> SSH Keys
  3. Click Add SSH Key
  4. IMPORTANT: extract the content of the generated public and private keys and paste it manually to the inputs.
  5. Save the key
  6. Try to start a workspace from an ssh url e.g. [email protected]:vinokurig/test.git
  7. When the workspace starts, the project should be cloned.

Release Notes

Docs PR

@che-bot
Copy link
Contributor

che-bot commented Aug 16, 2024

Click here to review and test in web IDE: Contribute

Copy link

Docker image build succeeded: quay.io/eclipse/che-dashboard:pr-1168

kubectl patch command
kubectl patch -n eclipse-che "checluster/eclipse-che" --type=json -p="[{"op": "replace", "path": "/spec/components/dashboard/deployment", "value": {containers: [{image: "quay.io/eclipse/che-dashboard:pr-1168", name: che-dashboard}]}}]"

@ibuziuk
Copy link
Member

ibuziuk commented Aug 16, 2024

cc: @dmytro-ndp would be nice to backport it to 7.90.x

@ibuziuk ibuziuk requested a review from dmytro-ndp August 16, 2024 15:08
Copy link

codecov bot commented Aug 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.91%. Comparing base (5eb0a3a) to head (2489712).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1168      +/-   ##
==========================================
- Coverage   90.03%   89.91%   -0.13%     
==========================================
  Files         432      432              
  Lines       44705    44718      +13     
  Branches     3073     3077       +4     
==========================================
- Hits        40250    40206      -44     
- Misses       4419     4476      +57     
  Partials       36       36              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@olexii4 olexii4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dmytro-ndp
Copy link
Contributor

@akurinnoy : I have checked Eclipse Che next with https://quay.io/repository/eclipse/che-dashboard:pr-1168 and following test scenario descried i PR description.

Workspace has started successfully from [email protected]:vinokurig/test.git and project has been cloned at step 7 having SSH private key uploaded without trailing end of line:
Screenshot from 2024-08-19 19-28-53

Good job!

Copy link

openshift-ci bot commented Aug 19, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: akurinnoy, dmytro-ndp, ibuziuk, olexii4

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ibuziuk ibuziuk merged commit 2ae50bc into main Aug 19, 2024
17 of 18 checks passed
@ibuziuk ibuziuk deleted the paste-ssh-key branch August 19, 2024 17:18
@devstudio-release
Copy link

Build 3.17 :: dashboard_3.x/529: Console, Changes, Git Data

@devstudio-release
Copy link

@devstudio-release
Copy link

@devstudio-release
Copy link

@devstudio-release
Copy link

@devstudio-release
Copy link

@devstudio-release
Copy link

Build 3.17 :: dashboard_3.x/529: SUCCESS

Upstream sync done; /DS_CI/sync-to-downstream_3.x/7522 triggered

@devstudio-release
Copy link

@devstudio-release
Copy link

@devstudio-release
Copy link

@devstudio-release
Copy link

Build 3.17 :: get-sources-rhpkg-container-build_3.x/7504: FAILURE

devspaces-operator-bundle : 3.x :: Failed in 63477219 : BREW:BUILD/STATUS:UNKNOWN
FAILURE:; copied to quay

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SSH key added from the dashboard by pasting the key strings, is invalid
6 participants