Can't git with it on Ubuntu 16.0.4

Ugh, I’m having massive problems with using git in Virtualmin. It is truly the last piece of the puzzle.

On the Repository Commands page, the one that is created after creating the repository, are these commands still needed to be done by me? I thought Virtualmin took care of this for me.

Repository Commands
In domain owncloud.apps.northwestern.edu
Local repository initialization
mkdir ~/public_html/git/owncloudrepo
cd ~/public_html/git/owncloudrepo
git init
Setting up access to this repository

cd ~/public_html/git/owncloudrepo
git config remote.upload.url http://owncloud@owncloud.apps.northwestern.edu/git/owncloudrepo.git/
echo machine owncloud.apps.northwestern.edu login owncloud password $password >> ~/.netrc
Initial repository creation

cd ~/public_html/git/owncloudrepo
git --bare init
echo hello > hello.txt
git add hello.txt
git commit -m ‘initial checkin’
git push upload master
Checkout commands

cd ~/public_html/git/owncloudrepo
git pull upload master
Checkin commands

cd ~/public_html/git/owncloudrepo
git add somefile.pl
git commit
git push upload master
Checking out this repository anonymously

cd ~
git clone remote.upload.url http://owncloud/git/owncloudrepo.git/ ~/anontest

Secondly, I can’t seem to clone the repository using either ssh or https

dhcp-129-105-244-183:~ rtn361$ git clone https://owncloud@owncloud.apps.northwestern.edu/git/owncloudrepo.git
Cloning into ‘owncloudrepo’…
Password for ‘https://owncloud@owncloud.apps.northwestern.edu’:
fatal: Authentication failed for ‘https://owncloud@owncloud.apps.northwestern.edu/git/owncloudrepo.git/

Any insights would be greatly appreciated.

Howdy,

Just a quick note that it looks like you’re posting in the Forums, but marking it as private. I’m the only person who would ever see those, and i don’t get notifications for Forum messages… so it’s possible it could get overlooked.

As a Pro customer, you could always post in the Support Tracker if you’re interested in a private thread, we do get notifications for those. Or, if you don’t mark it as private, you’d have the whole community available to help out.

Now, regarding your issue –

You would indeed need to run those commands. What Virtualmin does is just make a repository available on the backend, and provides an interface for adding users to the repository.

It looks like you’re seeing an authentication issue there with your git setup.

Do you see any related errors in $HOME/logs/error_log for the domain in question? And is the user you’re trying to connect with added as a user with permission to view that repository?

-Eric

Actually, you mentioned it doesn’t work via https or SSH – can you share what error occurs when trying that via SSH?

-Eric

Hey Eric,

Thanks for the tips, both on posting to the forum and on using git with Virtualmin. Let me try those commands, then try using git one more time. I’ll post my results back here.

  • Ryan

So it looks like it’s maybe an auth issue. After running the step: git push upload master

I found this in the error log:

user owncloud: authentication failure for “/git/owncloudrepo.git/info/refs”: Password Mismatch

Maybe I’m not doing this command correctly:
echo machine owncloud.apps.northwestern.edu login owncloud password $password >> ~/.netrc

Did I need to replace $password with the actual password of the owncloud account or is that done automatically?

So I tried another virtual host and the git upload and checkout worked just fine. I did change the password on the one that is problematic, but I’m wondering, how do I modify the password to reflect the new one in use on the account?

My experience with Ubuntu server or desktop 16.04 is that it is not fully functional, so if you want things to work as expected I strongly suggest you start over with version 14.04. For myself when I could not get the server to work as expected I added Gnome desktop as I hate doing everything in a CLI. What I discovered are several incomplete functions. The Ubuntu software center has been replaced with a new version that is not fully functional and has several bugs. Almost the majority of packages (14.04) are not available or install-able. There is much more I could go on about but I think just this is enough for me. I hate to think Ubuntu is doing a windows thing and pushing out product not ready for prime time and I do not want to be their beta tester. After a week of trying to get it to work I gave up and installed Ubuntu server 14.04. This is my opinion, but if you do not want to struggle just go back to 14.04.
Thanks James Niland
nilandenterprise.com

Howdy,

I did change the password on the one that is problematic, but I’m wondering, how do I modify the password to reflect the new one in use on the account?

Just to clarify sespit, are you accessing it via SSH, or via HTTPS?

-Eric