How to use Eclipse's GIT integration with Gogs on a FreeNAS server


#1

I’m trying to use Eclipse’s integration with GIT, to push my local repository to my Gogs server, which is running on my FreeNAS server.

My Eclipse version is Mars.2 Release (4.5.2) Build id: 20160218-0600
My Gogs version is 0.9.15.0323.
My Gogs system is FreeNAS-9.3-STABLE-201602031011.
My Gogs database is sqlite3.

It might be a bug but is more likely user error.

Please take into consideration that I’m very new to FreeNAS, GIT and Gogs. I am a veteran Java programmer and Eclipse user, trying to educate myself on the use of these technologies within my home environment.

  • I don’t know how to try to reproduce the issue on https://try.gogs.io.
  • I don’t know how to upgrade to latest release.

When I push to Gogs Eclipse responds with:

http://xxx.xxx.xxx.xxx:3000/myuser/MyApplication.git:authentication not supported

This is a reasonably clear error message that lines up with the fact that my Authentication Manage Panel (Total: 0) in Gogs is empty. So if I assume that the authentication I use to login to my Gogs site running on my FreeNAS, is separate from the authentication for accessing GIT then it maybe I should add something to Authentication Manage Panel.

The options are LDAP, SMTP and PAM. I don’t have any of those services available to me. I’m shutdown at this point.

Thank you for the considerable time you have spent reading and responding to this topic.


#2

Can you clone on command line?


#3

I tried cloning on the command line and several other relevant GIT commands. Below is the record of those commands and their result.

C:\> git clone http://IPAddress:3000/myuser/project.git Test
Cloning into 'Test'...
remote: Counting objects: 3, done.
remote: Total 3 (delta 0), reused 0 (delta 0)
Unpacking objects: 100% (3/3), done.
Checking connectivity... done.

C:\> cd Test
C:\> ls
Test.txt

C:\> copy con: Test2.txt
This is a test.
^Z
        1 file(s) copied.

C:\> ls
Test.txt  Test2.txt

C:\> git add Test2.txt

C:\> git commit Test2.txt
[master 36dd04d] Simple Test
 1 file changed, 1 insertion(+)
 create mode 100644 Test2.txt

C:\> git push
Counting objects: 4, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 287 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To http://IPAddress:3000/myuser/project.git
   768dd0a..36dd04d  master -> master

At this point if I navigate to http://IPAddress:3000/myuser/project.git using a browser I see both files Test.txt and Test2.txt. The file Test2.txt was added by the GIT command line.

I was not prompted for a password during that process of command lines and I’m not sure why. Maybe because I used GIT integration for Windows explorer to push the Test.txt file to Gogs, just before I tried the command line. When using the Windows GIT integration to push Test.txt (not Test2.txt), Windows prompted me for a user name and password so I provided my Gogs credentials and Gogs must have accepted because Test.txt appeared in Gogs. Maybe the Windows GIT integration, set state somewhere, that GIT on the command line utilized. So I wondered if the Eclipse integration would pick up the same state. When I tested in Eclipse again, I still got the “http://IPAddress:3000/myuser/project.git: authentication not supported.” So it appears to me that the origin of the “authentication not supported” is Eclipse and not Gogs like I originally suggested in this topic. What do you think?

I think this topic still deserves treatment between Gogs and the Eclipse integration community. Can you help me research this topic further? Is there anyone in the Gogs community that uses the popular Eclipse IDE?

Thank you for your attention.


#4

Thanks, if it works on command line, not sure which authentication is not supported from Eclipse, maybe Eclipse is using digital auth, which Gogs indeed not support.


#5

I think the issue reported here is a valid problem between Eclipse/egit/jgit and Gogs.

In a nutshell I have a public repo, that requires credentials for push. I am able to interact with GOGS from Eclipse for all other remote operations, only push causes problems. Push operations require credentials. When I attempt to push I get the error:

Can’t connect to any repository: https://gogs.data.gov.bc.ca/daops/DataBCPyLib.git (https://gogs.data.gov.bc.ca/daops/DataBCPyLib.git: 401 Unauthorized)

Interestingly enough if I make the repository private, eclipse does what its suppose to and asks for credentials, when entered is able to successfully push to the remote.

There is a ticket with the eclipse team, if you have having this problem please vote for the ticket:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=513043


#6

I am able to reproduce this issue on the test site, steps to reproduce:
a) go to: https://try.gogs.io/KevinTester/TestTest.git

b) clone it, and add to eclipse

c) turn off sslVerify
git config http.sslVerify false

d) make a change to it the project in eclipse and attempt to commit and push.

You should get a prompt for username password, but instead will get a
Can’t connect to any repository: 401 Unauthorized)


#7

OK, we can continue on the GitHub issue thread.


#8

Hi, Could you describe how you installed the Gogs on FreeNas?

I tried setup a step by step the instructoion from link:

but i have a problem with packages:

/usr/sbin/pkg install -y memcached redis

(no packages)
so I tried update:
/usr/sbin/pkg update -f
but it returns

Updating FreeBSD repository catalogue...
Fetching meta.txz: 100%    944 B   0.9kB/s    00:01
Fetching packagesite.txz: 100%    6 MiB   1.5MB/s    00:04
Processing entries: 100%
FreeBSD repository update completed. 27001 packages processed.
Updating local repository catalogue...
pkg: Repository local load error: access repo file(/var/db/pkg/repo-local.sqlite) failed: No such file or directory
pkg: file:///usr/ports/packages/meta.txz: No such file or directory
repository local has no meta file, using default settings
pkg: file:///usr/ports/packages/packagesite.txz: No such file or directory
Unable to update repository local
Error updating repositories!