Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Sep 8, 2025

The "West Workspace from Git" and "Zephyr IDE Workspace from Git" setup options were incorrectly rejecting SSH URLs like git@github.com:user/repo.git due to overly restrictive validation that required all Git URLs to contain ://.

Problem

Users trying to set up workspaces with SSH URLs would encounter validation errors:

SSH URL rejected

The validation logic only accepted URLs with protocols (containing ://), which excluded the common SSH format git@host:path.

Solution

  • Added comprehensive Git URL validation in src/utilities/utils.ts that accepts:

    • HTTPS URLs: https://github.com/user/repo.git
    • SSH URLs: git@github.com:user/repo.git
    • SSH with protocol: ssh://git@github.com/user/repo.git
    • Git protocol: git://github.com/user/repo.git
  • Updated workspace setup functions in src/setup_utilities/workspace-setup.ts to use the new validation

  • Improved user experience with placeholder text showing SSH examples: "https://github.com/user/repo.git or git@github.com:user/repo.git"

Validation Results

URL Format Before After
git@github.com:user/repo.git ❌ "must include protocol" ✅ Valid
https://github.com/user/repo.git ✅ Valid ✅ Valid
ssh://git@github.com/user/repo.git ✅ Valid ✅ Valid

The fix maintains full backward compatibility while enabling SSH workflow support that works with both git clone and west init commands.

Fixes #185.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • update.code.visualstudio.com
    • Triggering command: node /home/REDACTED/work/zephyr-ide/zephyr-ide/node_modules/.bin/vscode-test (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits September 8, 2025 17:09
Co-authored-by: rijesha <7819200+rijesha@users.noreply.github.com>
Co-authored-by: rijesha <7819200+rijesha@users.noreply.github.com>
@Copilot Copilot AI changed the title [WIP] Zephyr IDE's "Workspace Setup -> West Workspace from Git" does not accept SSH upstream URLs Fix SSH URL validation in Git workspace setup Sep 8, 2025
Copilot finished work on behalf of rijesha September 8, 2025 17:13
@Copilot Copilot AI requested a review from rijesha September 8, 2025 17:13
@rijesha rijesha marked this pull request as ready for review September 8, 2025 20:45
@rijesha rijesha merged commit 3ec5724 into develop Sep 8, 2025
2 checks passed
@rijesha rijesha deleted the copilot/fix-185 branch September 8, 2025 20:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Zephyr IDE's "Workspace Setup -> West Workspace from Git" does not accept SSH upstream URLs
2 participants