Sign in to iTunes Connect error on CI Build System

I am using CI system to build, sign and notarize MacOS application.

My problem is that when I have to upload the application for notarization using:

xcrun altool --notarize-app --primary-bundle-id <bundle> --username <apple_id> --password <passwd> --file <file>

The upload gives me this error:

2019-06-19 21:41:59.620 altool[35802:70182] *** Error: To use this application, you must first sign in to iTunes Connect and sign the relevant contracts. (1048)

How can I do that? Since it boots VM to do the job I have no access to GUI to open iTunes Connect log in and so on

Is that even possible ?

Thanks in advance