简体   繁体   English

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

[英]Pushing local git repository from Matlab fails: You can't push to git://github.com/user/repo.git use https://github.com/user/repo.git

I recently started using GitHub because I want to share some Matlab code with a coworker.我最近开始使用 GitHub,因为我想与同事分享一些 Matlab 代码。 However, I cannot seem to get the Git integration to push my changes to the online repository.但是,我似乎无法通过 Git 集成将我的更改推送到在线存储库。 I have tried using the SVN integration with https://github.com/user/repo.git and the Git integration with git://github.com/user/repo.git with no success.我曾尝试将 SVN 与https://github.com/user/repo.git集成,并将 Git 与 git://github.com/user/repo.git 集成,但没有成功。

Every time I select Push from the Source Control menu I get the following error message: git://github.com/user/repo.git: You can't push to git://github.com/user/repo.git Use https://github.com/user/repo.git每次我从 Source Control 菜单中选择 Push 时,我都会收到以下错误消息:git://github.com/user/repo.git: You can't push to git://github.com/user/repo.git使用https://github.com/user/repo.git

Switching to SVN and using https://github.com/user/repo.git leads to a different error ( https://github.com/user/repo.git : cannot open git-upload-pack).切换到 SVN 并使用https://github.com/user/repo.git会导致不同的错误( https://github.com/user/repo.git : 无法打开 git-upload-pack)。

I am very much at the end of every path I could find.我几乎在我能找到的每条道路的尽头。 Has anyone had similar issues?有没有人遇到过类似的问题? I am working on a MacBook Pro using Matlab 2016b.我正在使用 Matlab 2016b 在 MacBook Pro 上工作。

Thank you.谢谢你。

Here's what fixed it:这是修复它的内容:

(1) Set up a local Git repository (either through Matlab by going to Source Control > Manage files, and selecting Git integration OR using command line syntax) The address used for this is either git://github.com/username/repository.git (through Matlab) OR https://github.com/username/repository.git (through terminal) (1) 设置本地 Git 存储库(通过 Matlab 转到 Source Control > Manage files,然后选择 Git integration 或使用命令行语法) 用于此的地址是 git://github.com/username/repository .git(通过 Matlab)或https://github.com/username/repository.git (通过终端)

(2) Setup an SSH key for your system as described here (2) 按照此处所述为您的系统设置 SSH 密钥

(3) If not done so already during step 2, change the Git repository origin to the SSHaddress (git@github.com:username/repository) using git remote set-url origin git@github.com:username/repository.git (3) 如果在第 2 步中还没有这样做,请使用 git remote set-url origin git@github.com:username/repository.git 将 Git 存储库来源更改为 SSH地址(git@github.com:username/repository)

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Git 推送:缺少凭据或凭据无效。 致命:“https://github.com/username/repo.git”的身份验证失败 - Git push: Missing or invalid credentials. fatal: Authentication failed for 'https://github.com/username/repo.git' Github 远程:未找到存储库。 致命:在 Pycharm 中找不到存储库“https://github.com/org/repo.git/” - Github remote: Repository not found. fatal: repository 'https://github.com/org/repo.git/' not found in Pycharm Git,致命:无法访问“https://github.com/path/to/repo.git”:gnutls_handshake() 失败:pull 函数出错 - Git, fatal: unable to access 'https://github.com/path/to/repo.git': gnutls_handshake() failed: Error in the pull function 在github.com上分享私人git仓库 - Forking private git repo in github.com 如何从回购中获取git日志。 在github.com? - how to get git log from a repo. in github.com? 将现有的git repo添加到github.com后,从github.com内部看不到 - After adding existing git repo to github.com, not visible from inside github.com 在Windows上无法使用git://IP/r​​epo.git - Can't use git://IP/repo.git on Windows Git Bash:远程错误:你无法推送到git://github.com/ - Git Bash: remote error: You can't push to git://github.com/ “git push”无限期挂起(对于 github.com) - "git push" hangs indefinitely (for github.com) 致命的:找不到存储库'https://github.com/user_name/first_app.git/' - fatal: repository 'https://github.com/user_name/first_app.git/' not found
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM