Error installing packages in Rtools and RStudio

install.packages(c("ggplot2", "reshape2", "dplyr"))
--- Please select a CRAN mirror for use in this session ---
Warning: failed to download mirrors file (cannot open URL 'https://cran.r-project.org/CRAN_mirrors.csv'); using local file 'C:/Users/tzrg8z/AppData/Local/Programs/R/R-4.4.1/doc/CRAN_mirrors.csv'
Warning: unable to access index for repository https://repo.miserver.it.umich.edu/cran/src/contrib:
cannot open URL 'https://repo.miserver.it.umich.edu/cran/src/contrib/PACKAGES'

That's the kind of error I get when my machine is not connected to the internet.

Sometimes my firewall blocks installs.