Are you trying to Allie with a person or an AI?
For a live person build the proposal in diplomacy and send them the request.
For AI change your status with them to Right of passage, they will usually change their status with you to same after several days deliberation. I am not sure if they can truly Allie with you.