31

Facing this error while committing code from Eclipse to Github

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!

1
  • Judging by the message, Eclipse is not trying to access Github via SSH. It's using the https URL. You need to change the authentication method somewhere in the settings or use a login and password configuration if HTTPS is okay for you. Commented May 24, 2015 at 9:21

10 Answers 10

49

To resolve this issue, do the followings

  1. login to your GitHub account
  2. go to https://github.com/settings/tokens
  3. click on "Generate new token"
  4. make necessary selections (but must select repo)
  5. click on "save"
  6. System will have a token
  7. use this token instead of a password in the eclipse or other tools you are using
  8. Now push your code from Github and it will work.

Thanks

Sign up to request clarification or add additional context in comments.

1 Comment

As of August 13, 2021, you no longer have the option of using a password, as per github notice: "Beginning August 13, 2021, we will no longer accept account passwords when authenticating Git operations on GitHub.com" You can read more about this here: github.blog/…
9

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.

Bitbucket ssh uri selection

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

Regards...

Comments

5

In your Eclipse Editor, Right click on your project -> Team -> Remote -> Configure Push to Upstream

Once the window opens, click "change..." button. Now you'll get a window called 'Select a URI'.

In the authentication part, Enter your GitHub username and DO NOT Enter your GitHub password. For this, you need to create a 'personal access token' from Github. And ENTER the 'personal access token' instead of your GitHub password, in order to connect the repository.

Please refer to the following websites for a better understanding:

Comments

2

If you have generate ssh keys, then you should use an ssh url

[email protected]:user/repo

If you keep using https, then you need to enter in Eclipse your username and GitHub password: see "egit - not authorized".

1 Comment

Thanks VonC. Issue is fixed after providing the way you mentioned above.
1

I faced the same issue but its got resolved now by generating and passing the access token as password while connecting with the local repo of eclipse.

for reference:-https://www.youtube.com/watch?v=lMQmTcBmq-U (this video is pretty helpful),hope it helps.

1 Comment

Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
1
  1. Navigate to https://github.com/settings/tokens
  2. Under personal access tokens Select Tokens classic
  3. Click on Generate new token.
  4. Select the required options.
  5. Then click on generate token

Copy this token and paste it in the authentication prompt where its asking for user name and password.

For user name put your github user name and under password use the newly generated Classic token and commit the code..

Hope this helps !!!! :)

Comments

0

This can be associated with BitBucket (example) problem. Be patient and wait for them to solve this issue. If it worked before for you it will work again as soon as they fix the problem.

1 Comment

if you use bitbucket you can check status of it bitbucket.status.atlassian.com
0

I faced with the same issue, but my problem solved by the below steps I changed the setting then it is worked for me Go to Window -> Preferences -> General -> Network Connections in Active Provider select Native option

Comments

0

Just Create a personal Access token and use it instead of password. If you are wondering how you create that, then please checkout the link below .Just Click here

Comments

0

Steps to upload the project from git(previous version):- Step 1 : Create GitHub account and SignIn

Step 2 : Start a Project = Create a repository

Step 3 : Start Eclipse

Step 4 : Goto Perspective - Git Repositories and click on Add Git Repo

Step 5 : Create a project in Eclipse

Step 6 : Do a right click on Project - Team - Share - Add to git repo

Step 7 : Commit and Push the project to the repo

Step 8 : Commit and Push every change to the repo

UPDATE While connecting/pushing to github from any external platform/tool, you will NOW need to provide ACCESS TOKEN in place of password To generate Access Token

  1. Login to your GitHub account
  2. Verify your email address, if it hasn't been verified yet.
  3. In the upper-right corner of any page, click your profile photo, then click Settings.
  4. In the left sidebar, click Developer settings.
  5. In the left sidebar, click Personal access tokens.
  6. Click Generate new token.
  7. Give your token a descriptive name.
  8. To give your token an expiration, select the Expiration drop-down menu, then click a default or use the calendar picker
  9. Select the scopes, or permissions, you'd like to grant this token. To use your token to access repositories from the command line, select repo.
  10. Click Generate token

I hope this works Thanks

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.