pycharm git工具与coding.net结合

时间:2022-06-19
本文章向大家介绍pycharm git工具与coding.net结合,主要内容包括其使用实例、应用技巧、基本知识点总结和需要注意事项,具有一定的参考价值,需要的朋友可以参考一下。

前提:coding.net中的项目是私密项目

问题描述:在使用pycharm自带的git工具clone(或者push)代码时出现 错误如下: Push failed: Failed with error: unable to access 'https://git.coding.net/xxx.git/': The requested URL returned error: 403

原因:这是由于 私有项目,没有权限,需要输入用户名密码。

解决方法如下: 在.git文件夹下的config文件中远程仓库url添加username:password@,如下

[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邮箱时还是出现上述错误,所以我采用的是另外的登录账户。