【发布时间】:2021-07-23 06:27:53
【问题描述】:
查看了关于 SO 的相关文章,但没有成功。
我在 macOS 上:
安装 Rust 正常:
rustup update nightly
rustup update stable
rustup target add wasm32-unknown-unknown --toolchain nightly
然后安装这个:
XX-MacBook-Air-2 substrate-node-template % git clone -b v2.0.0 --depth 1 https://github.com/substrate-developer-hub/substrate-node-template
Cloning into 'substrate-node-template'...
remote: Enumerating objects: 46, done.
remote: Counting objects: 100% (46/46), done.
remote: Compressing objects: 100% (42/42), done.
remote: Total 46 (delta 0), reused 29 (delta 0), pack-reused 0
Receiving objects: 100% (46/46), 69.55 KiB | 962.00 KiB/s, done.
Note: switching to '655bfdc6fc922d117849cbcf808ee5bf2dfa1d53'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
然后这个:
cd substrate-node-template/
还有这个:
XX-MacBook-Air-2 substrate-node-template % git checkout -b my-first-substrate-chain
fatal: cannot lock ref 'refs/heads/my-first-substrate-chain': Unable to create '/Users/patrickburns/substrate-node-template/.git/refs/heads/my-first-substrate-chain.lock': Permission denied
非常感谢任何有关如何解决此错误的想法。
【问题讨论】:
-
错误消息说,除其他外:“如果你想创建一个新分支来保留你创建的提交,你可以(现在或以后)通过使用 -c 和 switch 命令来这样做。” .
-
第一个提示表明您可以在同一目录中执行两次命令。
XX-MacBook-Air-2 substrate-node-template %也许你有一个目录substrate-node-template/substrate-node-template/包含代码。