aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/cli/bun-install.md3
-rw-r--r--docs/cli/install.md3
-rw-r--r--docs/install/index.md3
-rw-r--r--docs/runtime/bunfig.md11
-rw-r--r--src/install/lockfile.zig3
5 files changed, 22 insertions, 1 deletions
diff --git a/docs/cli/bun-install.md b/docs/cli/bun-install.md
index 0cbc21e1d..2fa3afd71 100644
--- a/docs/cli/bun-install.md
+++ b/docs/cli/bun-install.md
@@ -62,6 +62,9 @@ dev = true
# Install peerDependencies (default: false)
peer = false
+# Whether to use the github REST api (unauthenticated)
+github.api = true
+
# When using `bun install -g`, install packages here
globalDir = "~/.bun/install/global"
diff --git a/docs/cli/install.md b/docs/cli/install.md
index 9aafae301..dd6f68cca 100644
--- a/docs/cli/install.md
+++ b/docs/cli/install.md
@@ -89,6 +89,9 @@ frozenLockfile = false
# equivalent to `--dry-run` flag
dryRun = false
+
+# whether to use the github REST api (unauthenticated)
+github.api = true
```
{% /details %}
diff --git a/docs/install/index.md b/docs/install/index.md
index 11e0d4fd4..d2f684c09 100644
--- a/docs/install/index.md
+++ b/docs/install/index.md
@@ -91,6 +91,9 @@ frozenLockfile = false
# equivalent to `--dry-run` flag
dryRun = false
+
+# whether to use the github REST api (unauthenticated)
+github.api = true
```
{% /details %}
diff --git a/docs/runtime/bunfig.md b/docs/runtime/bunfig.md
index 83f66b1b1..49c7513b1 100644
--- a/docs/runtime/bunfig.md
+++ b/docs/runtime/bunfig.md
@@ -216,6 +216,17 @@ Whether to install peer dependencies. Default `false`.
peer = false
```
+### `install.github.api`
+
+Enable using the github REST API to install github dependencies. Default `true`.
+
+Private github repositories will fail to install if this option is true because the REST API is unauthenticated.
+
+```toml
+[install]
+github.api = true
+```
+
### `install.production`
Whether `bun install` will run in "production mode". Default `false`.
diff --git a/src/install/lockfile.zig b/src/install/lockfile.zig
index 76f6fedc7..2a2e86514 100644
--- a/src/install/lockfile.zig
+++ b/src/install/lockfile.zig
@@ -1507,10 +1507,11 @@ pub fn verifyResolutions(this: *Lockfile, local_features: Features, remote_featu
} else {
if (failed_dep.version.tag == .github) {
Output.prettyErrorln(
- "<r><red>error<r><d>:<r> <b>{s}<r><d>@<b>{}<r><d> failed to resolve<r>\nIf this is a private repository set install.github.api to false in bunfig.toml\n\n",
+ "<r><red>error<r><d>:<r> <b>{s}<r><d>@<b>{}<r><d> failed to resolve<r>\nIf \"{s}\" is a private repository, set install.github.api to false in bunfig.toml\n\n",
.{
failed_dep.name.slice(string_buf),
failed_dep.version.literal.fmt(string_buf),
+ failed_dep.name.slice(string_buf),
},
);
} else {