genbox 1.0.55 → 1.0.56

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.
@@ -430,6 +430,27 @@ exports.createCommand = new commander_1.Command('create')
430
430
  }
431
431
  }
432
432
  }
433
+ // Validate git credentials and warn if missing
434
+ const envVarsForValidation = configLoader.loadEnvVars(process.cwd());
435
+ const gitValidation = validateGitCredentials(resolved.repos.map(r => ({ url: r.url, name: r.name })), envVarsForValidation.GIT_TOKEN, privateKeyContent);
436
+ if (gitValidation.warnings.length > 0) {
437
+ console.log('');
438
+ console.log(chalk_1.default.yellow('⚠ Git Authentication Warnings:'));
439
+ for (const warning of gitValidation.warnings) {
440
+ console.log(chalk_1.default.yellow(` ${warning}`));
441
+ }
442
+ console.log('');
443
+ if (!options.yes) {
444
+ const continueAnyway = await prompts.confirm({
445
+ message: 'Continue anyway? (cloning private repos may fail)',
446
+ default: false,
447
+ });
448
+ if (!continueAnyway) {
449
+ console.log(chalk_1.default.dim('Cancelled.'));
450
+ return;
451
+ }
452
+ }
453
+ }
433
454
  // Handle database copy - dump locally and upload to S3
434
455
  let snapshotId;
435
456
  let snapshotS3Key;
@@ -914,6 +935,26 @@ function buildAppEnvContent(sections, appName, serviceUrlMap) {
914
935
  .trim();
915
936
  return envContent;
916
937
  }
938
+ /**
939
+ * Validate git configuration and warn about missing credentials
940
+ */
941
+ function validateGitCredentials(repos, gitToken, privateKey) {
942
+ const warnings = [];
943
+ const errors = [];
944
+ for (const repo of repos) {
945
+ const isHttps = repo.url.startsWith('https://');
946
+ const isSsh = repo.url.startsWith('git@') || repo.url.includes('ssh://');
947
+ const isPrivateRepo = repo.url.includes('github.com') && !repo.url.includes('/public/');
948
+ if (isHttps && !gitToken && isPrivateRepo) {
949
+ warnings.push(`Repository '${repo.name}' uses HTTPS URL but GIT_TOKEN is not set.`);
950
+ warnings.push(` Add GIT_TOKEN=<your-github-token> to .env.genbox for private repos.`);
951
+ }
952
+ if (isSsh && !privateKey) {
953
+ warnings.push(`Repository '${repo.name}' uses SSH URL but no SSH key was injected.`);
954
+ }
955
+ }
956
+ return { warnings, errors };
957
+ }
917
958
  /**
918
959
  * Build API payload from resolved config
919
960
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "genbox",
3
- "version": "1.0.55",
3
+ "version": "1.0.56",
4
4
  "description": "Genbox CLI - AI-Powered Development Environments",
5
5
  "main": "dist/index.js",
6
6
  "bin": {