学习笔记《composer》
2016-10-18 本文已影响0人
Julian1009
$ composer update失败
命令行键入 composer update出现如下提示,
Cloning failed using an ssh key for authentication, enter your GitHub credentials to access private repos
Head to https://github.com/settings/tokens/new?scopes=repo&description=Composer+on+userName.local+2016-10-18+0247
to retrieve a token. It will be stored in "/Users/*/.composer/auth.json" for future use by Composer.
Token (hidden):
额,此处是懵逼的,不知道是要什么Token,于是乎abort
No token given, aborting.
You can also add it manually later by using "composer config github-oauth.github.com <token>"
万能的google上找到解决方法
First you will want to cd into your .ssh directory. Open up the terminal and run:
cd ~/.ssh && ssh-keygen
Next you need to copy this to your clipboard.
On OS X run: cat id_rsa.pub | pbcopy
On Linux run: cat id_rsa.pub | xclip
On Windows (via Cygwin/Git Bash) run: cat id_rsa.pub | clip
Add your key to your account via the website.
首先命令行进入.ssh文件夹回车,
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/*/.ssh/id_rsa):
继续回车下一步,
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /Users/*/.ssh/id_rsa.
Your public key has been saved in /Users/*/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:wkJpOuONPPBRUJp***********CDYXhzgFvMHoiMJkY user@user.local
The key's randomart image is:
+---[RSA 2048]----+
|.E.o+=.=.o o. |
|oooBo+B + o |
|+ o O= o . |
| =ooB o |
|. = .ooBS. |
| = * ...+ |
| * . . |
| . |
| |
+----[SHA256]-----+
然后回车,会生成文件id_rsa.pub,然后vi id_rsa.pub复制得到token。