我只是發現瞭解決方案。
要設置默認的用戶名和密碼:
打開文件/opt/cloud9/build/standalonebuild/configs/standalone.js
。
找到以下代碼塊。 (應該是在該文件的頂部)
if (!optimist.local) {
optimist
.boolean("t")
.describe("t", "Start in test mode")
.describe("k", "Kill tmux server in test mode")
.default("b", false)
.describe("b", "Start the bridge server - to receive commands from the cli")
.default("w", config.workspaceDir)
.describe("w", "Workspace directory")
.alias("p", "port")
.default("port", process.env.PORT || config.port)
.describe("port", "Port")
.alias("d", "debug")
.default("debug", false)
.describe("debug", "Turn debugging on")
.alias("l", "listen")
.default("listen", process.env.IP || config.host)
.describe("listen", "IP address of the server")
.boolean("help")
.describe("workspacetype")
.alias("ws", "workspacetype")
.describe("readonly", "Run in read only mode")
.alias("ro", "readonly")
.describe("packed", "Whether to use the packed version.")
.boolean("packed")
.default("packed", config.packed)
.alias("a", "auth")
.describe("auth", "Basic Auth username:password")
.default("auth", ":")
.describe("collab", "Whether to enable collab.")
.default("collab", config.collab)
// @lennartcl this should be moved
.describe("lb.fileserver", "LogicBlox file server Url")
.default("lb.fileserver", config.logicblox && config.logicblox.fileServerURL);
}
在線路.default("auth", ":")
,在用戶名和密碼類型要在格式使用用戶名:密碼,例如.default("auth", "user:pass")
你應該全部設置!嘗試訪問11.22.33.44:3000
,並且應該彈出提示輸入用戶名和密碼的提示。
在一個側面說明,如果你想改變文件名(默認的 「李四」):
打開文件/opt/cloud9/build/standalonebuild/settings/standalone.js
。
找到以下代碼塊。
user: {
uid: 1,
name: "johndoe",
fullname: "John Doe",
email: "[email protected]",
pubkey: null
},
更改的fullname
值到想要的用戶名。
重新啓動BeagleBone Black並轉至11.22.33.44:3000
,您將在Cloud9 IDE上看到更新的配置文件名稱。
我不得不添加'.default(「auth」,「user:pass」)'但它工作。 – 2016-02-28 15:54:09