前提:coding.net中的项目是私密项目git
问题描述:在使用pycharm自带的git工具clone(或者push)代码时出现 错误以下:
Push failed: Failed with error: unable to access 'https://git.coding.net/xxx.git/': The requested URL returned error: 403工具
缘由:这是因为 私有项目,没有权限,须要输入用户名密码。fetch
解决方法以下:
在.git文件夹下的config文件中远程仓库url添加username:password@,以下url
[core] repositoryformatversion = 0 filemode = false bare = false logallrefupdates = true symlinks = false ignorecase = true [remote "gitbook"] url = https://username:password@git.gitbook.com/alleniverson/mybook.git fetch = +refs/heads/:refs/remotes/gitbook/
这里还有一个问题就是当用户名使用的是qq邮箱时仍是出现上述错误,因此我采用的是另外的登陆帐户。.net