It is very common that we all use special characters in the password to maintain the complexity. But these special characters sometimes create issues while using it in programs. In this post I will be explaining on how to handle the special characters in the git credentials.

The Git URL with credentials has the following format

The best way to handle special characters in the credentials is to encode the characters. The following table has the mapping of special characters with the corresponding encoded string.

mapping of special characters to encoded string

For example a password p@ssword will become p%40ssword after encoding.