can't connent to any respository when I push the code to remote - eclipse

I am facing the issue "when I commit the code to local respository success,then I can't push the code from eclipse to git repository..."
How can I get past the error message
Can't connect to any repository:
https://gitee.com/JinJiaoJingTong/SanPin.git
(https://gitee.com/JinJiaoJingTong/SanPin.git: cannot open git-receive-pack)

As in this article, check the logs of Eclipse, and try:
Window-> preference-> Team-> Git-> configuration-> user setting to ensure that the user password is correct
window-preferences-General-Security- Secure Storage-Content
Find git items, clear it

Related

VS Code github keeps showing Uploading files forever

The message keeps saying uploading files "forever". What I did was created a folder with a file inside. On Github, the repository was created successfully but the file is not uploading. And yes I have installed git.
The repository created successfully but the files are not uploading.
If you have the latest Git for Windows, chances are you have a git config credential.helper set to manager-core.
As I mentioned in "After $git push -u origin main command, Git bash is not requesting any authentication literally does nothing", the same issue is seen in command-line, not just VSCode.
This is because of the Git-Credential-Manager-Core (interface to the Windows Credential Manager, in charge of caching your credentials: GitHub username/token).
Try and install the last GCM-Core (released yesterday), and see if the issue persists then.
Or, alternatively, you could use an SSH URL, again, to see if the issue persists.
What fixed it for me:
In VSCode: File -> Preferences -> Settings.
Filter for "git".
Select "git (80)" on the left pane.
Uncheck this:
Git: Require Git User Config
Controls whether to require explicit Git user configuration or allow Git to guess if missing

Error 401 Authorization required when pushing to github repository

I've been working with my remote github repository with no problem at all. But since yesterday I'm not able to push to my remote repository anymore.
I work with the eclipse IDE git pluggin and whenever I try to push I am getting this error:
https://github.com/jotaseme/josemaria.moreno.IWVG-doo.miw.upm.es.git:
401 Authorization Required
I've double-checked the user and password and also I've tried with other pc. The same situation: failed pushing to remote repository.
Any suggestion?
Thanks in advance.
Found this gist in one of the eclipse platforms:
In Eclipse
Help -> Install New Software
Work with: http://download.eclipse.org/mpc/releases/1.5.1a
Select the "EPP Marketplace Client"
Proceed with defaults

invalid username/password in egit when pushing changes to googlecode

I have a project hosted in googlecode with Git.
I'm using STS (SpringSource Tool Suite) with eGit.
I cloned the repository at home and I could commit & push the changes successfully.
I did the same thing at work and when I try to push the changes after commiting them, it shows the following error:
https://myuser#code.google.com/p/myproject/: Invalid username/password.
You may need to use your generated googlecode.com password; see https://code.google.com/hosting/settings
I entered the googlecode generated password when I first cloned the repository (as I did at home, and this error never showed up). I try entering it again and nothing changes.
Does anyone know what could be causing this?
Thanks!!
Do as following:
Open Git repositories view, open "Remotes > origin > " and click "Change Credentials..."
Further reference: http://www.eclipse.org/forums/index.php/t/209017/
Enjoy!
I resolved it by going to Preferences > General > Security > Secure Storage > Contens tab and deleting default secure storage for repository.

How do I push to Git Repo given the following error: An internal Exception occurred during push: ssh://git#github.com/xxx/xxx.git: session is down

I recently set up a github account to store the source code of a project I have been working on.
I am using egit eclipse plugin to push changes to github.
I successfully pushed the initial code and 2 subsequent changes. However when I attempted to push the third change I was not able. The following excepiton appears in the eclipse error log.
If someone could tell me the cause of this error, or tell me how I can go about debugging the problem it would be a great help.
org.eclipse.jgit.api.errors.JGitInternalException: Exception caught during execution of push command
at org.eclipse.jgit.api.PushCommand.call(PushCommand.java:156)
at org.eclipse.egit.core.op.PushOperation.run(PushOperation.java:227)
at org.eclipse.egit.ui.internal.push.PushOperationUI.execute(PushOperationUI.java:145)
at org.eclipse.egit.ui.internal.push.PushOperationUI$1.run(PushOperationUI.java:202)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: org.eclipse.jgit.errors.TransportException: ssh://git#github.com/xxx/xxx.git: session is down
at org.eclipse.jgit.transport.JschSession$JschProcess.<init>(JschSession.java:154)
at org.eclipse.jgit.transport.JschSession$JschProcess.<init>(JschSession.java:118)
at org.eclipse.jgit.transport.JschSession.exec(JschSession.java:91)
at org.eclipse.jgit.transport.TransportGitSsh$SshPushConnection.<init>(TransportGitSsh.java:306)
at org.eclipse.jgit.transport.TransportGitSsh.openPush(TransportGitSsh.java:152)
at org.eclipse.jgit.transport.PushProcess.execute(PushProcess.java:130)
at org.eclipse.jgit.transport.Transport.push(Transport.java:1120)
at org.eclipse.jgit.api.PushCommand.call(PushCommand.java:152)
... 4 more
Caused by: com.jcraft.jsch.JSchException: session is down
at com.jcraft.jsch.Session.openChannel(Session.java:750)
at org.eclipse.jgit.transport.JschSession$JschProcess.<init>(JschSession.java:147)
... 11 more
I experienced the same issue. Resolution follows:
Delete origin push and fetch in remote(Eclipse view --> Git repositories).
Close Eclipse.
Go to .ssh folder(Users/.ssh) and delete the key files(public and private).
Start eclipse and regenerate the keys(Window --> Preferences --> General tab --> Network connections --> SSH2).
Copy the key and add it to github/SSH Keys
In Eclipse add new remote and push.
Edit
You may not need to delete all the key files. If you have already added a key file previously (perhaps while setting up native Git), you can just add the name of that file in list of keys, and it will work.
This seemed to work for me:
Do everything Firoz and Nishant say except push: https://stackoverflow.com/a/9889350
Create or edit the following file on your desktop:
File : ~/.ssh/config
Content :
Host github.com
User [your_github_username]
Hostname github.com
PreferredAuthentications publickey
IdentityFile [path_to_private_key]
In your Eclipse Git Setup for your project do the following:
URI : git#github.com:[repo_owner_username]/[repo_name].git
Protocol : ssh
Username : git
Password : [leave_blank]
Save and push.
See this GitHub SSH Help page for useful info: http://help.github.com/ssh-issues/
Worked for me after initially suffering through "session is down" and "cannot open git-upload-pack" errors. Hope it helps everyone else too.
Good luck!
I faced the same problem and I found out solution which is extremely foolish.
I took following steps:
I logged into git repository of my project from browser and didn't sign out.
I copied the http url to push or pull from project repository from github.
I pasted the url in my eclipse plugin while pushing code (didn't use the already stored one even though both of them were same)
I don't know what and why but above steps have worked for me whenever I have faced above problem. I don't know why does eclipse throw such exceptions and why does it gets solved this way.
You can also try pushing using other ways outside of eclipse. for eg. `TortoiseGit` or `SmartGit` etc.
I had the same problem. I fixed it by pointing the JAVA_HOME variable to jdk 6. It was originally pointing to jdk 5.
I got this error message and it was fixed when one of my co-workers emailed me the two files id_rsa and id_rsa (MS Pub doc), I put them in C:Users\[userID]\.ssh, and shut down and restarted my IDE.
I had this issue with EGit and solved it at last. Somehow sometimes things get messed up. If you can not solve it through Eclipse just go to your "git" folder with git bash with Windows. With Linux it is even easier: just open the terminal.
This problem occurs because of username, password, and ssh keys getting messed up.
So, use the commands "git remote show origin" and make sure if the origin is username#github.com...... Sometimes Eclipse just puts "git" as a username so make sure you have the correct user name by changing it with the command git remote set-url origin https://usrname#github.com/restofthe url. It should automatically change the configurations in eclipse.
Best...
I also had this issue.
The following command in Git Bash, comes handy in such scenarios: git remote prune origin
This configured the Pull/Push in the corrupted branch.

Possible to Connect Netbeans with GitHub?

I know the Git integration is Netbeans 7.0 is new and under development, but has anyone had success on pushing/pulling to GitHub?
When I click Git->Push the remote repository url shows up correctly under Step 1. Configured Repository.
But is just stays stuck on " Connecting to repository". It also pops up a box saying "Specify Git repository location" with the exact same url , clicking OK does nothing.
If instead I choose "Specify Git Repository Location" I eventually get an error, "Cannot connect to the remote repository at git#github.com:username/..."
ps. I am aware of the other similar stack questions but they are confusing, one person mentions that he was able to do this, while others mention is not yet possible to use a remote Git connection.
I have had the same issue.
And now it works fine for me.
I have done this:
1 With CLI ( Terminal for me) Define your remote repo :
cd yourlocalfolder
git remote add origin git#github.com:username/repo.git
2 Open Netbeans (7.1 for me)
Go to Team > Git > Remote > Push
3 You should see your remote repo preselected
4 in Private /public key browse to your rsa file
usr/username/ssh/id_rsa
5 Click on Next
6 Done
You need check 'Specify Git Repository Location:'
'Repository URL:' https://github.com/<your username>/<yourGitFile>.git
'User:' <your username>
But is just stays stuck on " Connecting to repository". It also pops up a box saying "Specify Git repository location" with the exact same url , clicking OK does nothing.
I faced the exact same issue and after I did some research I found that the problem was with the password.
GitHub isn’t accepting passwords for Git operations anymore.
So instead of using a password, Github suggests using Personal Access Token.
Go to your Github account settings.
Go to Developer settings in the sidebar.
Go to Personal access tokens.
Generate new token.
Make sure to check repo scope checkbox to access your repositories.
After you get your access token you can copy it and past it in the password field in the "Specify Git repository location" window and try to push your project.