Beaglebone Black 上的 Cloud9 密码
Cloud9 Password On Beaglebone Black
我正在使用来自此处的 BBB 的 Debian 映像:Debian (BeagleBone Black - 2GB eMMC) 2014-05-14
此映像内置 Cloud9 IDE。它非常适合我的目的,但我不知道如何添加密码。网络上的任何人都可以访问 11.22.33.44:3000(不是实际的 IP 地址),IDE 会自动将他们登录为 "John Doe"(无需密码)。
有没有办法在登录Cloud9时请求用户名和密码?如果浏览器保存密码我没问题,但它应该至少询问一次
我刚刚找到解决方案。
设置默认用户名和密码:
打开文件/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
,应该会有一个弹出窗口提示输入用户名和密码。
附带说明,如果您想更改配置文件名称(默认 "John Doe"):
打开文件/opt/cloud9/build/standalonebuild/settings/standalone.js
.
找到以下代码块。
user: {
uid: 1,
name: "johndoe",
fullname: "John Doe",
email: "johndoe@example.org",
pubkey: null
},
将 fullname
的值更改为您想要的用户名。
重新启动 BeagleBone Black 并转到 11.22.33.44:3000
,您将在 Cloud9 IDE.
上看到更新的配置文件名称
我正在使用来自此处的 BBB 的 Debian 映像:Debian (BeagleBone Black - 2GB eMMC) 2014-05-14
此映像内置 Cloud9 IDE。它非常适合我的目的,但我不知道如何添加密码。网络上的任何人都可以访问 11.22.33.44:3000(不是实际的 IP 地址),IDE 会自动将他们登录为 "John Doe"(无需密码)。
有没有办法在登录Cloud9时请求用户名和密码?如果浏览器保存密码我没问题,但它应该至少询问一次
我刚刚找到解决方案。
设置默认用户名和密码:
打开文件
/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
,应该会有一个弹出窗口提示输入用户名和密码。
附带说明,如果您想更改配置文件名称(默认 "John Doe"):
打开文件
/opt/cloud9/build/standalonebuild/settings/standalone.js
.找到以下代码块。
user: { uid: 1, name: "johndoe", fullname: "John Doe", email: "johndoe@example.org", pubkey: null },
将
fullname
的值更改为您想要的用户名。重新启动 BeagleBone Black 并转到
11.22.33.44:3000
,您将在 Cloud9 IDE. 上看到更新的配置文件名称