Snowbum discusses it at the top of this page:
First try the belt/rope trick while standing over the bike on the pegs. Run it through the handle and provide some gentle up pressure while you try turning the unlocked cap off. If that doesn't work, follow the instructions on drilling a hole to release the mechanism.
'78 R100/7 '69 R69S '52 R25/2
If your gas cap spins without resistance in both directions that is the locked position.
In the unlocked position there is usually a ratcheting sound when you tighten it after it bottoms out. If it makes a ratcheting sound when you turn it counterclockwise the mechanism has probably failed.
When the cap seems "locked" and will not move to unscrew it usually means that the threaded portion of the cap is stuck in the threads of the tank. Penetrating oil and gentle persuasion are your best bet.
If the cap makes the ratcheting sound when trying to unscrew it the the belt trick is the way to go.