create a new file besides the ovpn file, e.g. pass.txt, write the username in the first line and the password in the second line (don't forget the extra newline at the end of the file). Then extend your config-file with auth-user-pass pass.txt.
BTW: if you're running a recent distribution, you can place the config- and pass.txt-file under /etc/openvpn (if necessary like on fedora in the subdirectory /etc/openvpn/client and control it with systemd start [email protected] (or systemd start [email protected] on fedora). To have it automatically enabled, use enable --now instead of start. You can check the status with systemctl status
source: https://forums.openvpn.net/viewtopic.php?t=11342#p25419