Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't use git with aptana

Tags:

git

aptana

When i try to put something on a git server it's givin' me an error: "Reference to undefined variable USER"

In bash: echo $USER giving me correct answer.

What could it be?

It's eclipse with aptana-3 plugin (a whole pack)

like image 227
matiit Avatar asked Aug 02 '26 18:08

matiit


2 Answers

A bash session might have the correct environment variable set.

But the native OS session might not (like a DOS session on Windows for instance).
Can you launch your aptana from a session which has just before set the correct value for USER?

If it still fails (like in this thread), try also to set the correct value for $HOME.

like image 158
VonC Avatar answered Aug 05 '26 08:08

VonC


Update: Tracked down the issue. Looks like Eclipse is biting on ENV values that contain "${" in the value. A user was changing his command prompt to incude his username, hostname and pwd. After he commented it out of his .profile, it avoided the issue. As a result I added a bugfix to fix that in our development stream that should get into our next release.

--

Looks like a duplicate of https://aptana.lighthouseapp.com/projects/35272/tickets/1867-git-push-has-encountered-a-problem

I'm not able to replicate the issue, but if you could provide some more details on that ticket I can take a look, since I wrote all of our git support. It's likely that somehow something like $USER is sneaking into the git executable path, and when passed along to the launching infrastructure, it tries to interpret it as an eclipse launching variable (as opposed to a ENV var) that it can't resolve.

like image 20
Christopher Williams Avatar answered Aug 05 '26 07:08

Christopher Williams