There actually was a raid on Tobruk, 13-14 September 1942, including the German-Jewish SIG and fake British POWs. Unlike the outcome in the movie, "Operation Agreement" was a complete failure.
The actual raid was a complete failure. The seaborne troops failed to land in force. The German and Italian forces rallied and the Allied force had to disperse and flee. The British lost several hundred men killed and captured, one cruiser, two destroyers, six motor torpedo boats and dozens of small amphibious craft.
Several sources say that the movies was filmed in Almeria, but unusually at the time, it was entirely shot in the U.S.