@adobe/aem-cli 16.20.1 → 16.20.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [16.20.2](https://github.com/adobe/helix-cli/compare/v16.20.1...v16.20.2) (2026-06-11)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **up:** handle non-parseable SSH git remote origin gracefully ([#2741](https://github.com/adobe/helix-cli/issues/2741)) ([d2d34d4](https://github.com/adobe/helix-cli/commit/d2d34d44d515e455ed39d1820311752ad1b608ad))
7
+
1
8
  ## [16.20.1](https://github.com/adobe/helix-cli/compare/v16.20.0...v16.20.1) (2026-06-09)
2
9
 
3
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/aem-cli",
3
- "version": "16.20.1",
3
+ "version": "16.20.2",
4
4
  "description": "AEM CLI",
5
5
  "main": "index.js",
6
6
  "type": "module",
package/src/up.cmd.js CHANGED
@@ -139,11 +139,32 @@ export default class UpCommand extends AbstractServerCommand {
139
139
  });
140
140
 
141
141
  const ref = await GitUtils.getBranch(this.directory);
142
- this._gitUrl = await GitUtils.getOriginURL(this.directory, { ref });
142
+ let gitUrlError;
143
+ try {
144
+ this._gitUrl = await GitUtils.getOriginURL(this.directory, { ref });
145
+ } catch (e) {
146
+ gitUrlError = e;
147
+ }
148
+
143
149
  if (!this._gitUrl) {
144
- throw Error('No git remote found. Make sure you have a remote "origin" configured.');
150
+ if (gitUrlError) {
151
+ if (this._originalUrl && !this._originalUrl.includes('{{')) {
152
+ this.log.warn(chalk`Could not parse git remote origin URL: {yellow ${gitUrlError.message}}`);
153
+ this.log.warn(chalk`Continuing with the provided {cyan --url} value.`);
154
+ this._url = this._originalUrl;
155
+ } else {
156
+ this.log.error(chalk`Could not parse git remote origin URL: {yellow ${gitUrlError.message}}`);
157
+ this.log.error('The git remote origin uses an SSH URL format that cannot be automatically resolved.');
158
+ this.log.error(chalk`Please specify the content origin URL using the {cyan --url} option:`);
159
+ this.log.error(chalk` {cyan aem up --url https://main--<repo>--<owner>.aem.page}`);
160
+ throw Error('Invalid git remote origin URL. Use --url to specify the content origin.');
161
+ }
162
+ } else {
163
+ throw Error('No git remote found. Make sure you have a remote "origin" configured.');
164
+ }
165
+ } else {
166
+ await this.initUrl(this._gitUrl, ref);
145
167
  }
146
- await this.initUrl(this._gitUrl, ref);
147
168
  this._project.withProxyUrl(this._url);
148
169
  const { site, org } = this.extractSiteAndOrg(this._url);
149
170
  if (site && org) {