从Matlab推送本地git存储库失败:您不能使用https://github.com/user/repo.git推送到git://github.com/user/repo.git

openGhost

我最近开始使用GitHub,因为我想与同事共享一些Matlab代码。但是,我似乎无法获得Git集成来将更改推送到在线存储库。我尝试将SVN集成与https://github.com/user/repo.git一起使用,以及将Git与git://github.com/user/repo.git进行集成都没有成功。

每次我从Source Control菜单中选择Push时,都会收到以下错误消息:git://github.com/user/repo.git:您无法将其推送到git://github.com/user/repo.git使用https://github.com/user/repo.git

切换到SVN并使用https://github.com/user/repo.git会导致另一个错误(https://github.com/user/repo.git:无法打开git-upload-pack)。

我在所能找到的每条道路的尽头。有人遇到过类似的问题吗?我正在使用Matlab 2016b开发MacBook Pro。

谢谢。

openGhost

修复问题的方法如下:

(1)设置本地Git存储库(通过Matlab转到“源代码管理”>“管理文件”,然后选择Git集成或使用命令行语法),用于此操作的地址为git://github.com/username/repository .git(通过Matlab)或https://github.com/username/repository.git(通过终端)

(2)按照此处所述为您的系统设置SSH密钥

(3)如果在第2步中尚未这样做,则使用git remote set-url origin [email protected]:username / repository.git将Git存储库源更改为SSH地址[email protected]:username / repository)。

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章