当我们选择VCS->Import into Version Control->Share Project on GitHub提交代码。
今天自己写了一个简单的学习项目想分享到GitHub上去,结果在Android Studio 2.1.2中出现了错误:
- Can't finish GitHub sharing process
- Successfully created project 'TestAndroid5XControl' on GitHub, but initial commit failed:
- *** Please tell me who you are.
- Run
- git config --global user.email "you@example.com"
- 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: empty ident name (for ) not allowed
- during executing git -c core.quotepath=false commit -m "Initial commit" -- (show balloon)
说的很清楚,由于是初次配置的环境,没有配置好相应的一些必须的信息就会出现这样的错误。大致意思是需要一个名称才能提交到github上面,解决办法如下。
1. 在你安装Git的目录下找到git-cmd这个可执行文件
2. 设置邮箱地址,之后设置用户名。如下:
- git config --global user.email "you@example.com"
- git config --global user.name "Your Name"
修改为自己的email+name。
在这些设置好之后,重新提交代码出现了另一个问题:
Can't finish GitHub sharing process
Successfully created project 'XXXX' on GitHub, but initial push failed:
unable to access 'https://github.com/jinhuizxc/XXXX.git/': error setting certificate verify locations:
解决办法:
git config --system http.sslverifyfalse
(
错误信息
使用TortoiseGit执行pull命令时显示
- 1
- 2
- 3
- 4
- 5
- 1
- 2
- 3
- 4
- 5
Git version 2.9.2.windows.1
解决方法
先打开git bash窗口
执行命令:
- 1
- 1
(注意修改为正确的文件路径)或
- 1
- 1
我使用git config --system http.sslverify false命令解决问题。
版权声明:本文为jinhui157原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。