How can I customize the commit command in subclipse? - eclipse

I can connect to my subversion server fine with Subclipse, but my commit is not working, and I'd like to add in some custom commands to make it work (I need to pass a un/pw). How can I set these parameters?
Right now the command it's setting is just
commit -m ""
I'd like it to be
commit -m --username <un> --password <pw>
Thanks.

Subversion will prompt you for username/password unless it has cached valid credentials. If you do not want to use those credentials, then you need to clear Subversion's cache. If using JavaHL, that means deleting the ~/.subversion/auth folder. On Windows, that is %APPDATA%\Subversion\auth
SVNKit caches credentials in the Eclipse keyring file.

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

Integrating GIT repository with Jenkins

When I am trying to give the Git URL in Jenkins source code management, I am getting this error:
Failed to connect to repository : Error performing command: git.exe ls-remote -h https://github.com/shivnathr/DevOPS1 HEAD
How can I avoid it?
Make sure your Jenkins is running as your account, and not as a service with a technical account.
That way, Jenkins will benefit from the same configuration as your account.
But first, check if you can, with your account, in a simple CMD shell session, execute that same command successfully:
git.exe ls-remote -h https://github.com/shivnathr/DevOPS1 HEAD
When you configure this in Jenkins, it gives this error. But if you ignore this error, does it then work for the build? Have you configured git tools in Jenkins? I am not sure if having git in the path for the user running Jenkins will work (it might), but if you configure a git tool, it should use the first tool in the list to find git. BUT, if the first tool is set to auto-install, then this problem can occur. Make sure the first git tool is just pointing to an installation on the machine. I believe this is a bug. I found this on one of my installations, but I have yet to open an issue for it.

How do I push to Heroku from Eclipse/PyDev?

I have a project written in Python, hosted on Heroku, and which I've been working on in Eclipse/PyDev.
I can commit fine from inside Eclipse, and I can git push heroku master from the command line, but it would be much smoother if I could push a branch directly from Eclipse.
The problem is I'm getting the username and password login prompt in Eclipse for my heroku remote.
Is there any way to set this up to use my SSH key from Eclipse?
Is there any way to set this up to use my SSH key from Eclipse?
Set the ssh keys on your machine and then change the url of the cloned repository to the ssh protocol 'git#....`
Once your keys are set correctly you should not see the username password again.
P.S
Once you set your keys and you have updated the repository url do a first time fetch/pull so your key will be added to the known_hosts file. (answer yes when prompt)

Change upstream of local (hg-git) clone from (github) original to fork

I discovered an OSS project I've contributed to had moved to github. I installed hg-git and cloned a local repo from the git:// URL; then I made changes.
I then realized I really wanted my own github fork, so I made one; but I haven't been able to figure out quite how to switch my existing local repo. I've changed the local repo settings to use the git:// URL of my fork, and it can pull; but I can't push my changes up. It tells me to use the https:// URL, but when I make that change, I can neither pull nor push -- I get an error 406, "not acceptable."
The work done in the local repo is minimal, so I can redo it, but it'd be simpler if the local repo and my fork could just connect now.
UPDATE
I've installed Github for Windows so I could manage the SSH key. It generated a key (github_rsa) and attached it to my Github account.
I edited the hgrc file and added a [ui]ssh= setting pointing to the local git 'ssh' command (buried down in %APPDATA%\Local\Github).
With this, if I go into a "git-shell" window, which I guess spawns ssh-agent, then I can enter commands such as "hg incoming" and the connection is made. So I've got the remote repo URL right, and within the git-shell ecosystem, I've got the SSH keys set up right.
From a regular CMD.EXE window, the same command yields "Permission denied (publickey)". From TortoiseHg, the same error appears when I try an "incoming" action. I'd prefer to keep using TortoiseHg, but I'm not sure how to get it to use SSH.
FINAL UPDATE
For some reason, TortoisePlink doesn't want to play with github's SSH server, at least not with the Github-for-Windows-generated key. So I still have Github for Windows installed (not necessarily a bad thing, but superfluous to what I wanted to do).
To get hg and TortoiseHg to connect, I had to modify my project settings:
[ui]
ssh = %USERPROFILE%\AppData\Local\GitHub\<salt>\bin\ssh -i %USERPROFILE%\.ssh\github_rsa
That is: point to the SSH command, installed with portable GitHub, and specify the github-generated key on the command line. With this configuration, I don't need ssh-agent to be running.
You need to push via ssh, meaning you need to push via:
hg push git+ssh://git#github.com/<login>/<repo>
Note the usage of git# instead of your login in the first part of the URL. This actually matters; the server will figure out your credentials via the supplied SSH key.
You may also have to add your ssh key to your GitHub account first (per step 4 of this page).
This assumes that you created a fork of the original GitHub repository via the GitHub UI; pushing to an empty repository with hg-git may require additional steps.

How to get eclipse sources using git?

I'm trying to get sources from
:pserver:anonymous#dev.eclipse.org:/cvsroot/eclipse
using git csvserver. I've just read Best practices for using git with CVS and tried different commands including
git cvsimport -p xCW2quwz6OlRE -d anonymous#dev.eclipse.org:/cvsroot/eclipse /cvsroot/eclipse
but I don't get past the password prompt (the password in the above line is probably pure nonsense, but it doesn't matter). According to the eclipse CVS_Howto the password should be empty (I've tried leaving the -p option out as well).
cvs -d :pserver:anonymous#dev.eclipse.org:/cvsroot/eclipse login
git cvsimport -v -d :pserver:anonymous#dev.eclipse.org:/cvsroot/eclipse -C eclipse -r cvs -k <module_name>
Choose module_name from http://dev.eclipse.org/viewcvs/viewvc.cgi/ e.g platform
Cheers,
Max
As mentioned in the comments, there are mirrors of most of the CVS projects in a git mirror site.
There are also a number of eclipse projects in the process of moving from CVS to Git. See http://git.eclipse.org/ for a list of projects moving. SWT is in the process of moving now.