Showing posts with label problems. Show all posts
Showing posts with label problems. Show all posts

How to solve "detected dubious ownership in repository" when "directory = *" does not seem to have any effect

The issue

This week me and my team started to get a weird git message

fatal: detected dubious ownership in repository [directory]

that basically did not allow us to pull nor push changes.

 

The simple solution that did not work

Most of the issues seemed Windows related and I was on Kubuntu, but I assumed that the operating system would not be a point of interest, which, in the end, proved to be correct.

All solutions pointed to the execution of a simple command

git config --global --add safe.directory [directory]

which would, simply, add the [directory] to the ~/.gitconfig file and that would mark the [directory] as being trusted and thus solving the issue. A more simple approach would be using * as the [directory], basically saying any directory.

And that was the road that I took. But with no success. I even tried --system instead of --global which would set that configuration at the system level (in /etc directory) instead of the making it only available to the user.

I ended up with a ~/.gitconfig file like this:

[user]
       email = m6@blogger.com
       name = M6
[safe]
       directory = *

But nothing seemed to work.


The suspicious directory

Early on, I did notice something weird. The [directory] presented in the solutions referred to local paths, but the [directory] I was getting was the repository server path.

If it was a local issue, the [directory] would be something like /home/m6/work/repo_project but I was getting /var/git/repo_project, which only exists on the repository server.

While doing the investigation, I did came across with a project that was working fine! This raised my doubts about that local ~/.gitconfig file being if any use since the that particular repository worked fine with, or without that file being present on the system.


The solution

I logged on the repository server and checked that my user had a ~/.gitconfig file present with the directory parameter pointing precisely to the path of the only project that was working fine.

I changed the value *, which means any path, gave it a try and suddenly the problem was solved for me.

I checked with my team and since the server is solely dedicated to be a git repository server, most of the people do not have a real home in the system since they do not have the need to work on the server.

The solution for the team users that do not have a home was to create a dummy /home/gitdummy directory, create a .gitconfig file holding

[safe]
       directory = *

and finally change the users home in the /etc/passwd file pointing it to /home/gitdummy.


Summary

In short, if you run into this issue and the straight forward solution does not seem to work for you as it did not for me, check where the path is located, enter on that system and add

[safe]
       directory = *

to the ~/.gitconfig file of your user.

If you run into a transversal issue affecting all users of that system, just apply that solution to all of them.

If the users do not have a home on that system, create a dummy home and point the users home to it.


./M6

Joomla Forum Post Assistant

While trying to find the problem on an old Joomla 2.5.11 website that had suddenly stopped working correctly, I found The Joomla Forum Post Assistant, shortened to (FPA), a nice and simple tool that helps one to detect possible problems on Joomla installations.

It's quite easy to use, just grab the latest version and uploaded it to your website, call it from the browser and that's it. Don't forget to remove it after you're done with it.

./M6

How to hack the beliefs that are holding you back

Sometimes we don't do things because of (wrong) beliefs we have. Getting rid of such believes can be hard, but not impossible, and are a must for entrepreneurs and everyone who wishes to go further on their career and personal life.
Here's How to hack the beliefs that are holding you back.

./M6

You're in Lisbon and have a problem on an Apple product?

The Mac hard disk died. After a RAM upgrade it worked fine for one week and then, just died...
A friend had exactly the same problem, he also upgraded the RAM and the Mac hard disk died.
Coincidence?
Probably...
I went to pick it up today and talked with the assistant about it. He said it was a coincidence, that he had two more Macs with the same problem, one had a RAM upgrade and the other was factory default...
Coincidence?
Maybe, may be not.

But what's really important is the assistance. If you ever have a problem on an Apple product and you're in Lisbon, just take it to Tou Aqui Tou Aí. Yes, the name (in portuguese) is... let's be nice and just call it, different... But the guys there are good, and that's what really count.

./M6

Painless Django Kickoff

I'm learning Django and, so far, I'm enjoying it.
But putting it to work, as a simple development environment on my laptop, was harder than I expected. Specially when it came to install the MySQL-Python connector.

If you'r looking for a great step-by-step tutorial, I recommend Starting a Django 1.6 Project the Right Way.

If you're starting with Django, or are having trouble setting Python with MySQL, maybe this will help: Painless Django with MySQL Install.

./M6

Drupal shows only front page

Trocaqui has gone "mad".
It was working fine and, suddenly, it started to show the front page, no matter what link I selected nor what address I inserted in the address bar...
This was so critical that I could't even login into the system to put the system on maintenance mode while fixing the problem...

I've researched and it look to be an Apache mod_rewrite problem.
It started to look like a clean URL problem so I decided to try the non-clean URL format and voilá, Drupal started to responde correctly...
Using the /?q= format I was able to login, set the system in maintenance mode and disable the clean URL format.
By now, I was at least able to manage it.

When in a similar situation, just change the clean URL with the standard Drupal format, it's actually quite easy. Just insert a ?q= between the first / and the following character.
Here's an example: http://www.trocaqui.net/forum is equivalent to http://www.trocaqui.net/?q=forum.

While this was good enough as a starting point, it was not the best solution, thus I continued the quest for the real solution.

I cloned the production site on my testing environment and was able to reproduce the problem, which is a great first step.
While analyzing the problem, I've found out that my .htaccess was broke and tried to fixed it following the steps of others that had .htaccess and Clean URLs problems.
Once the clean URLs were disables, I was unable to set them on again since Drupal tests clean URLs and only allows them to be activated if they will work.

Here's what worked for me, I edited the .htaccess and fixed things by setting the following:
  • RewriteEngine ON
  • RewriteRule "(^|/)\." - [F]
  • RewriteBase /
  • RewriteCond %{REQUEST_FILENAME} !-f
  • RewriteCond %{REQUEST_FILENAME} !-d
  • RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

Have special attention to the RewriteEngine ON, it may be case sensitive.

I hope this is helpful for others with a similar problem.
./M6

Fetching Lines From Big Files

Today I had a DB2 bulk loading problem. I got a couple of rejected records on a 2G+ file. These kind of files are too big to be manipulated with conventional text editors, and even text editors that can handle such files are, usually, not very fast.
Since I was in Windows, I've open th MSYS shell, changed into the correct directory and typed
cat -n STPRRIMH.S.ULD.U110115.UN | grep 1943664 > MH.txt
This is an instantiation of a more generic command
cat -n < file > | grep < line >
In a few seconds I had a new file containing exactly the information I needed.

Serious developers can't really live without Unix/Linux tools on their machines...

./M6

Drupal contact limitation

I've just set up a Portuguese speaking item exchange free service, named Trocaqui, based on Drupal. And I'm, obliviously, the website administrator.

I was contacting some of the earliest registered users when Drupal showed the following message:
Não pode contactar mais do que 3 utilizadores por hora. Por favor, tente novamente mais tarde.

It means "You cannot contact more than 3 users per hour. Please try again later.".
What kind of stupid limitation is this? I do understand this limitation when applied to common users, but the administrator?
Seriously, why can't the administrator use his own system without artificial limitations?

I've searched the subject and found out that, obviously, I was not the only one complaining about this for years, and there is no real workaround for it. So, I've just increased the number of messages per hour and will have to reconfigure it back when I finish the user contact task.

./M6

How Technology Can Screw Business

I'm searching for an automatic SMS send service, something sending a SMS via a web service.
Somehow two of the biggest Portuguese mobile operators, TMN and Optimus, don't provide this information on their web site, contrary to Vodafone that explains all their solutions and provides the corresponding prices and conditions.

This has forced me to contact the operators personally, so that their sales team can engage in a conversation with me and try their sales techniques that I'm already immune to.
For TMN I've requested that they call me back "immediately" as their form option said, but no phone call came from them. Maybe its because I'm competitor customer and they don't wish to make business with me. Or maybe it's just the form submission that didn't work. Whatever has happened, TMN did not called me back.
For Optimus, I've sent them an email to a specific email address that they provide in their web site. Here's the response:

Delivery has failed to these recipients or distribution lists:

16939@optimusnegocios.pt
The recipient's mailbox is full and can't accept messages now.
Microsoft Exchange will not try to redeliver this message for you.
Please try resending this message later, or contact the recipient direct

Isn't it great when technology screws your business big time?

I don't know what happened with TMN, but clearly something went totally wrong. It may have not been a technical problem, but in that case my contacts were loaded in their call center database and they've should have called me by now.

When it comes to Optimus, well, the answer is clear. Someone forgot to delete some old mails, haven't they? Or someone goofed big time with Microsoft Exchange Server, why is it configured to ignore customers? (Side Note: I love the last sentence where I should "contact the recipient direct", what am I doing by sending the recipient a direct email? I'm not contacting it through a middle man...)

Whatever the problem was, I'm almost positive that it was technical and that is how technology can screw business: by pushing them to competitors. What would their shareholders react if they knew this?
Good work Vodafone, it seems you're the one and only Portuguese mobile company that truly cares about your customers, at least you don't ignore them.

./M6

ZON ISP (Bad) as Usual

I'm considering changing my Internet Service Provider (ISP).

I currently have a optical fiber connection, fiber to the home (FTTH), from TVTel at 30Mbit/s.
But TVTel was acquired by ZON and so I'm considered migrating to it, since the value for money seems better, at approximately the same cost I can get a 50Mbit/s optical fiber connection.

But ZON has three major problems:
  1. Extremely bad reputation when it comes to ISP;
  2. Lousy customer service;
  3. the ZON optical fiber solution is not FTTH.
They are fighting the first couple of problems and the fact is that the number of complaints against them has seen a serious decrease.
But all this made me delay the decision for some months, to see if there were other ISPs that would provide me FTTH.
Unfortunately no one else provides FTTH on the area, and since ZON seems to be discontinuing the TVTel infrastructure that they bought, that leaves the optical fiber to the local node and coaxial cable solution.

So, I decided to give it a try, specially because there is a one month trial period were one can cancel the service if one is not satisfied.
And currently, I'm not a satisfied customer. The 50Mbit/s connection on the signed contract is actually working at less than 10% of the speed.
Here is this morning speed measure from the organization responsible for the internet in Portugal, Fundação para a Computação Científica Nacional
(FCCN), where it says that this morning I almost got an "astonishing" 5Mbit/s connection:

ZON internet connection speed meter.

Look at the red graph speed on the right of the picture. Yes, it says that if we were in 2002 and using an ADSL 4Mbit/s connect that would be great. Unfortunately this we're on the end of the first decade of the 21st Century and I have a signed contract for 50Mbit/s.
For details, check the numbers on the left, the first number is the maximum download speed, the second is the average download speed, the third is the maximum upload speed and the fourth is the average upload speed.
There's no doubt what so ever, ZON optical fiber connection is easily beaten by a 8Mbit/s ADSL connection.

Here's the download information detail

ZON internet download speed.

Check the graphs on the bottom. It not even gets close to 5Mbit/s and the average speed is just above 1.2Mbit/s and the speed is just not constant, it jumps up and down.
Remember that this is an optical fiber 50Mbits/s connection.

And here is my current TV Tel 30Mbit/s download speed data, taken immediately after I got the lousy speed from ZON.

TVTel internet download speed.

The average speed is just below 22MBit/s, the first value on the left. The maximum speed is just above 22MBit/s and the minimum speed is just above 20Mbit/s. The connection is stable, regular, linear, smooth and, above all, fast!

Let me correct my first sentence on this post: "I was considering changing my ISP", because with a service like this one, ZON will definitely not get a contract with me.
But the first ISP that provides me FTTH will probably.

./M6