将代码从Eclipse提交到Git存储库时,无法连接到任何URI错误 [英] Can't connect to any URI error while commiting code from Eclipse to Git Repository

查看:1279
本文介绍了将代码从Eclipse提交到Git存储库时,无法连接到任何URI错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



您好,



我在从Eclipse提交代码到Github的过程中遇到了'无法连接到任何URI:....'的问题。我还为我的机器生成了SSH密钥并添加到Github帐户。请帮助我...



谢谢! 在将我的项目从github移植到bitbucket时遇到了同样的问题,这就是我解决它的方法:
$ b

简介:我将在这里描述ssh密钥的用法。用户使用ssh生成一个唯一的密钥来连接远程机器。所以你可以在本地创建它。之后,用户将密钥上传到想要无密码连接并且更安全的远程机器。在Git上,同样的事情发生,用户创建一个ssh密钥,并将生成的密钥值上传到git系统提供程序(如Github或Birbucket)。上传你的唯一密钥后,你必须配置你的开发环境,让你的git系统提供者通过ssh密钥进行通信。

1)我使用ssh键来推送我的在eclipse中使用github提交远程代码,ssh密钥设置为 window - >偏好 - >一般 - >网络连接 - > SSH2 用于eclipse(在git推送时,如果设置,则使用此ssh密钥)。如果你的机器上没有任何ssh密钥,那么



4)最后尝试将您的提交推送到远程。你不能面对任何错误,如果你有我的答案请评论。



问候...


Hi,

I am facing the issue 'Can't connect to any URI:....' while committing code to Github from Eclipse. I have also generated SSH keys for my machine and added to the Github account. Please help me out...

Thanks!

解决方案

I faced the same issue while migrating my project from github to bitbucket and this is how I resolved it:

Introduction: I will describe the ssh key usage here. A user generates a unique key to connect to remote machines using ssh. So you can create it locally. After, user uploads the keys to the remote machines where want to connect without password and more securely. On Git, the same thing happens, user creates a ssh key and uploads the generated key value to the git system providers like Github or Birbucket. After uploading your unique key, you must configure your development environment to let your git system provider communicate providing security over ssh key.

1) I was using ssh key to push my commits to remote with github in eclipse, the ssh key is set at window -> preferences -> General -> Network Connections -> SSH2 for eclipse (on git pushes, this ssh key is used if set). If you do not have any ssh keys on your machine then follow this article to generate one for you and set it into eclipse at the path above.

2) In your github or bitbucke account, find the screen where you can save your ssh key. For bitbucket, it is at https://bitbucket.org/account/user/[user-name]/ssh-keys/. '[user-name]' here is your user name at bitbucket. Open your 'id_dsa.pub' file (where you generated your ssh key) with a text editor, select all, copy and paste into your github/bitbucket accounts' ssh key addition section and then click add.

3) At eclipse, be sure to use the 'ssh' GIT URI for your project. Go to Window -> Preferences -> Team -> Git -> Configuration, click 'Repository Settings' tab and paste your GIT ssh URI to remote.origin.url.

4) Finally try to push your commits to remote. You mustn't face any errors, if you have please comment under my answer.

Regards...

这篇关于将代码从Eclipse提交到Git存储库时,无法连接到任何URI错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆