强制化石在提交时提示输入用户名和密码?
Force fossil to prompt for user and password on commit?
假设我使用这些命令从 chiselapp.com 匿名克隆了一个 public 存储库:
$ fossil clone https://chiselapp.com/user/elviejo/repository/dwpt2 dwpt2.fossil
$ fossil open dwpt2.fossil
现在我想提交一个新文件:
$ fossil commit -m "these are my modifications"
Fossil 如何提示我输入用户登录名和密码?
PS:我知道我可以首先使用以下语法进行克隆:
https://user:pass@chiselapp.com
但假设我不能再次克隆...
谢谢你。
从你的问题中不能完全清楚你指的是哪个用户名和密码。我将假设您指的是用于在 chiselapp.com 上向存储库标识您自己的用户名和密码 — 换句话说,sync 用户名和密码,而不是commit 用户名。
您可以使用 fossil remote-url
命令更改遥控器 URL。正如帮助页面上所说:
The remote-url is set automatically by a "clone" command or by any
"sync", "push", or "pull" command that specifies an explicit URL.
The default remote-url is used by auto-syncing and by "sync", "push",
"pull" that omit the server URL.
因此,如果您想更改同步时使用的用户名,以下方法应该有效:
$ fossil remote-url https://user@chiselapp.com/user/elviejo/repository/dwpt2
$ fossil commit
如果没有指定密码,fossil 会提示你输入。
(注意如果是autosync setting is turned off, then commit will not be enough; you'd have to sync, push or pull).
假设我使用这些命令从 chiselapp.com 匿名克隆了一个 public 存储库:
$ fossil clone https://chiselapp.com/user/elviejo/repository/dwpt2 dwpt2.fossil
$ fossil open dwpt2.fossil
现在我想提交一个新文件:
$ fossil commit -m "these are my modifications"
Fossil 如何提示我输入用户登录名和密码?
PS:我知道我可以首先使用以下语法进行克隆:
https://user:pass@chiselapp.com
但假设我不能再次克隆... 谢谢你。
从你的问题中不能完全清楚你指的是哪个用户名和密码。我将假设您指的是用于在 chiselapp.com 上向存储库标识您自己的用户名和密码 — 换句话说,sync 用户名和密码,而不是commit 用户名。
您可以使用 fossil remote-url
命令更改遥控器 URL。正如帮助页面上所说:
The remote-url is set automatically by a "clone" command or by any "sync", "push", or "pull" command that specifies an explicit URL.
The default remote-url is used by auto-syncing and by "sync", "push", "pull" that omit the server URL.
因此,如果您想更改同步时使用的用户名,以下方法应该有效:
$ fossil remote-url https://user@chiselapp.com/user/elviejo/repository/dwpt2
$ fossil commit
如果没有指定密码,fossil 会提示你输入。
(注意如果是autosync setting is turned off, then commit will not be enough; you'd have to sync, push or pull).