6. Let the real number $x$ satisfy $\cos \left(x+30^{\circ}\right) \cdot \cos (x+$ $\left.45^{\circ}\right) \cdot \cos \left(x+105^{\circ}\right)+\cos ^{3} x=0$. Then, $\tan x$ $=$ . $\qquad$
$$
\begin{array}{l}
6.2 \sqrt{3}-1 . \\
\text { Let } \angle A=30^{\circ}, \angle B=45^{\circ}, \angle C=105^{\circ} \text {. Then } \\
\angle A+\angle B+\angle C=180^{\circ} \text {. }
\end{array}
$$

Therefore, $\angle A, \angle B, \angle C$ are the three interior angles of $\triangle ABC$.
$$
\begin{array}{l}
\text { Then } \tan x=\cot A+\cot B+\cot C \\
=\cot 30^{\circ}+\cot 45^{\circ}+\cot 105^{\circ} \\
=\sqrt{3}+1-(2-\sqrt{3})=2 \sqrt{3}-1 .
\end{array}
$$