bitbucket使用过程中遇到的异常及解决办法

刚开始使用SourceTree,提交代码时报错,如下:

git -c diff.mnemonicprefix=false -c core.quotepath=false commit -q -F C:\Users\AppData\Local\Temp\yo1s42oy.fz2
*** Please tell me who you are.
Run
 git config --global user.email "[email protected]"
 git config --global user.name "Your Name"
to set your account‘s default identity.
Omit
 --global to set the identity only in this repository.
fatal:
 unable to auto-detect email address (got ‘Colin@JustForMoney.(none)‘)

 如图:技术分享

原因:没有设置用户名和邮箱

解决办法:运行git;敲如下命令

git config --global user.email "[email protected]"
git config --global user.name "Your Name"

如果客户端没有装git, 可以在SourceTree中的菜单中点击“命令行模式”

设置完毕之后,就可以正常使用了

猜你喜欢

转载自843977358.iteye.com/blog/2260243