I think the error message is self explanatory, the RStudio IDE requires "command line developers tools" to be installed in your system in order to be able to interact with Git, and yes, that is exactly why you can't connect RStudio to GitHub (BTW this means connecting to the GitHub repository, not connecting to the GitHub Desktop software).
If the installation means RStudio provides are taken too long, you can install it yourself from another source.