If you selected a phone call as a two-factor authentication method for your Apple Developer account, you’re unable to log in dg command as the verification code sent via phone call fails.
Dg command uses fastlane, which currently does not accept two-factor authentication via phone calls.
Because we require fastlane to address this issue, we do not have an estimated resolution date at this time. However, you can use dg command temporarily with either of the following workarounds.
Link a compatible device with two-factor authentication to your Apple Developer account and use it for authentication
Add an SMS capable device to your Apple Developer account and receive two-factor authentication codes via text messages