No remote URL configured for current branch project - eclipse

Why is eclipse giving me this "No remote URL configured for current branch project" error every 2 minutes? It is triggered when the Yatta application request a project export, I assume.
Triggered by the de.yatta.eclipse.launcher.oomph.tasks plugin:
org.eclipse.team.core.TeamException: No remote URL configured for current branch in repository of project vaadinwebsite.
at org.eclipse.egit.core.GitProjectSetCapability.asReference(GitProjectSetCapability.java:81)
at org.eclipse.egit.core.GitProjectSetCapability.asReference(GitProjectSetCapability.java:53)
at de.yatta.eclipse.launcher.oomph.tasks.impl.ProfilesProjectSetImportTaskImpl.getProjectReference(ProfilesProjectSetImportTaskImpl.java:289)
at de.yatta.eclipse.launcher.oomph.tasks.impl.ProfilesProjectSetImportTaskImpl.getProjectReference(ProfilesProjectSetImportTaskImpl.java:276)
at de.yatta.eclipse.launcher.oomph.setup.internal.builders.ProfilesProjectSetImportTaskBuilder.addProjectReference(ProfilesProjectSetImportTaskBuilder.java:149)
at de.yatta.eclipse.launcher.oomph.setup.internal.builders.ProfilesProjectSetImportTaskBuilder.build(ProfilesProjectSetImportTaskBuilder.java:133)
at de.yatta.eclipse.launcher.oomph.setup.builders.core.SetupBuilder.buildTasks(SetupBuilder.java:290)
at de.yatta.eclipse.launcher.oomph.setup.builders.core.SetupBuilder.buildTasks(SetupBuilder.java:233)
at de.yatta.eclipse.launcher.client.export.ProfileExporter.createProfile(ProfileExporter.java:521)
at de.yatta.eclipse.launcher.client.export.ProfileExporter.exportProfile(ProfileExporter.java:103)
at de.yatta.eclipse.launcher.client.export.ExportJob.run(ExportJob.java:82)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
To the best of my knowledge, there is a remote URL for this project. I mention "eclipse" and "yatta" only to give some context. Considering the comments, it is probably more a "git" setup problem.

Eclipse's error message says "for current branch" (emphasis mine), so presumably it's not willing to take a global repository-wide remote: it wants one specifically for the current branch. If there is only one remote, most likely named origin, presumably this means you should set the current branch's remote setting to origin. If the current branch is zorg that would, on a command line, be git config branch.zorg.remote origin. What commands to use, or clicky boxes to click on, in Eclipse, I cannot say.
This seems like a bug in Eclipse: Git in general will use origin when no remote is configured (e.g., if you run git fetch and the current branch has no configured remote, Git tries to fetch from origin). Since Eclipse is its own thing, it can of course make its own rules, disregarding Git's in little ways like this, or even in major ways.
(Copied from comment to answer, with a bit of editorializing added :-) )

Related

GitHub main/master branch

I thought the default head branch was now called "main", but today, I noticed in a new repo, the default branch was still called "master". But when I wanted to rename it, the popup told me that I should use main?
My colleagues did see main as default, so I'm wondering, why don't I? Am I using an old version or something?
Although I don't see what repo is this related to, what you experience is most likely seeing your own fork instead of the upstream repository.
If your colleagues see main as the master branch and you see master on your side, check whether you don't have your username as a prefix in the repo URL or title (that'd be your fork) and instead try to navigate into the upstream repository (the one without your username as a prefix).
Unless you use a GitHub desktop client the version will be the same as your colleagues have because it's being served by the GitHub servers for all the users (kind of, ignoring A/B testing, load-balancing, CDN, etc) and only GitHub can change the version.
If you use the desktop client, always try to update first before opening tickets/questions as issues might have already been resolved

Disable Gerrit for repository in Eclipse

I accidentally enabled Gerrit for one of my Git repositories when developing in Eclipse. Is there any way to disable this?
I'm primarily asking because it seems to have the side-effect of slowing down my staging processing within Eclipse for that repository ever since the enabling of Gerrit.
Update:
I couldn't find anything in the Git config for the repository that pointed to Gerrit or reviewing. So, I tried removing the repository and the projects associated with it from the workspace and then re-importing it, but that doesn't help either..
Turns out that Gerrit is configured through the existing remote configuration (e.g., origin) itself. There are specific push/fetch specs associated with Gerrit that are added by Eclipse. If you simple remove all the existing specs and add the ones you need (or just All Branches Spec) from both the push and fetch spects, then Gerrit is disabled again.
Thanks to #VonC for putting me on the right track!
Both "Eclipse Gerrit" and "EGit/Contributor Guide" mentions a remote named "review"
Check in command line if you can remove it:
cd /path/to/your/repo
git remote remove review

EGit greying out / not showing commit

I've been running into a wired problem (which has been described (but not solved) here as well:
I used to develop using PyDev and Egit (recent versions, EGit is 3.0.3) with just a local repository. Everything worked fine, I was able to commit, branch, reverse etc. just using the "Team" menue in my PyDev perspective.
Now I added a remote reposisory to host the project and since then, I can not commit to my local repository. File changes are not detected (even worse: I change file A and afterwards all folders are marked as "changed" (having the ">" icon) and no file is recognized as "needing synchronization". The only menu points which are available are "Add to index" (which has no effect) and "Pull" (which says "everything is up to date" - which is true since there is nothing new on the server to pull).
When I use git (either command line or git extensions), I see the changed file as changed and it's offered for staging. I can use plain git to commit, push, etc, everything works as expected and no error messages are shown. I'm just using one branch (master).
Even if I open the "Git Repository Exploring" perspective in Eclipse and got to the tab "Git Staging", the file is listed.
I jus started a new test project with just a local repository (residing in the same git-folder ~/git) and here I can commit as I'm used to... And I added the project to the same repository server - and still everthing works! I can commit, I can push, everything is fine there...
yes, I can work around hat by using git extensions, but I really liked the smooth integraion of git in eclipse. Therefore, all ideas, remarks etc. are very welcome! And yes, I tried restarting eclipse ;o).
Finally!!!
Since everything was working before I added the remote host, amd everything worked in my small toy project, I removed and re-added my remote host using gut bash:
git remote remove origin
git remote add origin git#my_servername:my_repository.git
I suppose some configuration files were corrupted in a very non-obvious way (I checked all config fiels and did not notice anything...)
Sounds like a bug, and you might be able to get it back to a good state by playing around with the plugin setting data.
Located here: ${workspace}/.metadata/.plugins
I highly recommend backing up that whole folder before you start playing around. I have had other eclipse issues that have been resolved by going in here and deleting things.

Eclipse-fetch says my Git repo is current so what's the ↓13 mean?

As a git noob, Eclipse is not helping my confusion... I switched to me local master branch and ran a fetch with the settings below:
Firstly I don't understand why the "Next" button is disabled. Secondly when I run the fetch using "Finish", it tells me I am already up to date (makes sense as I already fetched). So what does the ↓13 mean? Isn't it telling me my local branch is behind the remote branch? Or that the remote branch is itself behind... but this is the remote master so what can it be behind of?
It means that you are 13 commits behind the origin.
If the arrow is pointing up, that means that your branch is X commits ahead of the origin.
As far as your Next button being grayed out. I believe it's because you havn't selected the Ref yet. Click the ref, and then you should see it.
FYI - when i started out with Git, i tried to use the eGit plugin for Eclipse, and I can say to you as a new person in Git. Use command line! I've had my local git repositories corrupted from the plugins, and it's not very intuitive.

SVN authorization failure, trunk non-existent in head revision, getting a GIT repository working in Eclipse

To simplify things, I have one local SVN repository D:\folder\repo_name and I have svnserve running as a service with root set to the mentioned path. Subclipse and SmartSVN can connect to the repository, also displays the correct head revision number, but when I try to explore the trunk (the only branch) it gives the following error: URL 'svn://localhost/trunk' non-existent in that revision. This while I can check out the complete repository perfectly fine. But I don't need the all the branches, I need just the contents of the trunk.
When I try to commit I get the error Authentication failed. However my credentials were fine when checking out earlier.
When I try to get my stuff out of there and move to GIT (which I suppose would be best as everything is always kept local), the git svn clone process completes, I see all my revisions and files pass in GIT Bash, and then try to import it in Eclipse. I see that it tries to import the project into the repository directory itself (see http://wiki.eclipse.org/Image:Egit-0.9-import-projects-general-project.png). Needless to say I get the error in the shape of D:\folder\repo_name_git overlaps the location of another project: 'repo_name_git' What I don't get is why I can't seem to find a single way to let me specify where I want the project to import into.
Alternatively, when I add the project in the git repository as an existing project into Eclipse, and then - through the Team > Share menu - try to get under version control, I get the error Can not move project to target location D:\folder\repo_name_git, as this location overlaps with location D:\folder\repo_name_git, which contains a .project file
I'm at a loss and these errors are to generic to give me an idea of how to tackle them. Any heads up would be appreciated.
2 points:
I was getting "Authentication failed" on "correct" credentials - except the plugin I used was forcing the first letter of my username to uppercase - check the case of your username (upper or lower).
I've just had a problem moving onto a Subversion 1.7 repository, which is not supported by my Subversive plugin, and I was getting some strange errors.
You need to check the credentials
make sure svnserve is not started with -R {readonly option}
Check if the following lines are commented in
"\REPO_NAME\conf\svnserve.conf
anon-access = read
auth-access = write
password-db = passwd"