diff --git a/dvc/config.py b/dvc/config.py
index a2956d3d0..40e705e27 100644
--- a/dvc/config.py
+++ b/dvc/config.py
@@ -498,7 +498,15 @@ class Config(object):  # pylint: disable=too-many-instance-attributes
             >>> get_remote_settings("server")
             {'url': 'ssh://localhost/'}
         """
-        settings = self.config[self.SECTION_REMOTE_FMT.format(name)]
+        settings = self.config.get(
+            self.SECTION_REMOTE_FMT.format(name.lower())
+        )
+
+        if settings is None:
+            raise ConfigError(
+                "unable to find remote section '{}'".format(name)
+            )
+
         parsed = urlparse(settings["url"])
 
         # Support for cross referenced remotes.
diff --git a/dvc/data_cloud.py b/dvc/data_cloud.py
index 0bb000ef0..5802826af 100644
--- a/dvc/data_cloud.py
+++ b/dvc/data_cloud.py
@@ -43,10 +43,16 @@ class DataCloud(object):
         "https": RemoteHTTP,
     }
 
-    def __init__(self, repo, config=None):
+    def __init__(self, repo):
         self.repo = repo
-        self._config = config
-        self._core = self._config[Config.SECTION_CORE]
+
+    @property
+    def _config(self):
+        return self.repo.config.config
+
+    @property
+    def _core(self):
+        return self._config.get(Config.SECTION_CORE, {})
 
     def get_remote(self, remote=None, command="<command>"):
         if not remote:
@@ -69,13 +75,8 @@ class DataCloud(object):
         )
 
     def _init_remote(self, remote):
-        section = Config.SECTION_REMOTE_FMT.format(remote).lower()
-        cloud_config = self._config.get(section, None)
-        if not cloud_config:
-            msg = "can't find remote section '{}' in config"
-            raise ConfigError(msg.format(section))
-
-        return Remote(self.repo, cloud_config)
+        config = self.repo.config.get_remote_settings(remote)
+        return Remote(self.repo, config)
 
     def _init_compat(self):
         name = self._core.get(Config.SECTION_CORE_CLOUD, "").strip().lower()
diff --git a/dvc/remote/local/slow_link_detection.py b/dvc/remote/local/slow_link_detection.py
index 2a197f8d7..7bd3bb143 100644
--- a/dvc/remote/local/slow_link_detection.py
+++ b/dvc/remote/local/slow_link_detection.py
@@ -48,7 +48,7 @@ class SlowLinkDetectorDecorator(object):
 def slow_link_guard(method):
     def call(remote_local, *args, **kwargs):
         cache_config = remote_local.repo.config.config.get(
-            Config.SECTION_CACHE
+            Config.SECTION_CACHE, {}
         )
         should_warn = cache_config.get(
             Config.SECTION_CACHE_SLOW_LINK_WARNING, True
diff --git a/dvc/repo/__init__.py b/dvc/repo/__init__.py
index eb6ec0396..0f43957c1 100644
--- a/dvc/repo/__init__.py
+++ b/dvc/repo/__init__.py
@@ -75,7 +75,7 @@ class Repo(object):
             logger.setLevel(level.upper())
 
         self.cache = Cache(self)
-        self.cloud = DataCloud(self, config=self.config.config)
+        self.cloud = DataCloud(self)
         self.updater = Updater(self.dvc_dir)
 
         self.metrics = Metrics(self)

dvc gc: bug of looking for remote path at local machine
My setup:
```
$ dvc version
DVC version: 0.40.1
Python version: 3.7.3
Platform: Linux-4.4.0-43-Microsoft-x86_64-with-debian-stretch-sid
```
See all documentation regarding the bug from [this Discord message](https://discordapp.com/channels/485586884165107732/563406153334128681/582841112461574184) and 15 messages forward.



diff --git a/tests/func/test_data_cloud.py b/tests/func/test_data_cloud.py
index eecd6dbdb..d0e20bbed 100644
--- a/tests/func/test_data_cloud.py
+++ b/tests/func/test_data_cloud.py
@@ -235,7 +235,8 @@ def get_oss_url():
 
 class TestDataCloud(TestDvc):
     def _test_cloud(self, config, cl):
-        cloud = DataCloud(self.dvc, config=config)
+        self.dvc.config.config = config
+        cloud = DataCloud(self.dvc)
         self.assertIsInstance(cloud.get_remote(), cl)
 
     def test(self):
@@ -285,7 +286,8 @@ class TestDataCloudBase(TestDvc):
         config = copy.deepcopy(TEST_CONFIG)
         config[TEST_SECTION][Config.SECTION_REMOTE_URL] = repo
         config[TEST_SECTION][Config.SECTION_REMOTE_KEY_FILE] = keyfile
-        self.cloud = DataCloud(self.dvc, config)
+        self.dvc.config.config = config
+        self.cloud = DataCloud(self.dvc)
 
         self.assertIsInstance(self.cloud.get_remote(), self._get_cloud_class())
 
@@ -394,7 +396,8 @@ class TestRemoteGS(TestDataCloudBase):
         config[TEST_SECTION][
             Config.SECTION_GCP_CREDENTIALPATH
         ] = TEST_GCP_CREDS_FILE
-        self.cloud = DataCloud(self.dvc, config)
+        self.dvc.config.config = config
+        self.cloud = DataCloud(self.dvc)
 
         self.assertIsInstance(self.cloud.get_remote(), self._get_cloud_class())
 

pip install -e .[all]
parse_log_pytest
pytest
pytest pytest-cov pytest-xdist pytest-mock pytest-asyncio pytest
apt-get update apt-get install -y gcc pip install -e .[tests]
3.7
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
aliyun-python-sdk-core==2.16.0
aliyun-python-sdk-core-v3==2.13.33
aliyun-python-sdk-kms==2.16.5
altgraph==0.17.4
appdirs==1.4.4
asciimatics==1.14.0
attrs @ file:///croot/attrs_1668696182826/work
autocommand==2.2.2
awscli==1.31.13
azure-common==1.1.28
azure-nspkg==3.0.2
azure-storage-blob==1.3.0
azure-storage-common==1.3.0
azure-storage-nspkg==3.1.0
bcrypt==4.2.1
black==19.3b0
boto==2.49.0
boto3==1.9.115
botocore==1.12.253
cachetools==5.5.2
certifi @ file:///croot/certifi_1671487769961/work/certifi
cffi==1.15.1
charset-normalizer==3.4.1
click==8.1.8
collective.checkdocs==0.2
colorama==0.4.4
configobj==5.0.9
configparser==5.3.0
coverage==7.2.7
crcmod==1.7
cryptography==44.0.2
distro==1.9.0
docutils==0.15.2
dulwich==0.22.1
-e git+https://github.com/iterative/dvc.git@1bf8ad1d3d2fb0bb1ccf007cb4fd20f313e47566#egg=dvc
execnet==2.0.2
flake8==5.0.4
flake8-docstrings==1.7.0
flaky==3.8.1
flit_core @ file:///opt/conda/conda-bld/flit-core_1644941570762/work/source/flit_core
future==1.0.0
gitdb==4.0.12
GitPython==3.1.44
google-api-core==1.34.1
google-auth==2.38.0
google-cloud-core==0.28.1
google-cloud-storage==1.13.0
google-compute-engine==2.8.13
google-crc32c==1.5.0
google-resumable-media==2.7.2
googleapis-common-protos==1.69.2
grandalf==0.6
humanize==4.6.0
idna==3.10
importlib-metadata==4.2.0
importlib-resources==5.12.0
inflect==6.0.5
iniconfig @ file:///home/linux1/recipes/ci/iniconfig_1610983019677/work
jaraco.classes==3.2.3
jaraco.collections==4.2.0
jaraco.context==4.3.0
jaraco.functools==3.7.0
jaraco.structures==2.1.0
jaraco.text==3.11.1
jaraco.ui==2.3.0
jaraco.windows==3.9.2
jmespath==0.10.0
jsonpath-ng==1.7.0
macholib==1.16.3
mccabe==0.7.0
mock==5.2.0
mock-ssh-server==0.9.1
more-itertools==9.1.0
nanotime==0.5.2
networkx==2.6.3
oss2==2.6.1
packaging @ file:///croot/packaging_1671697413597/work
paramiko==3.5.1
path==16.6.0
path.py==12.5.0
pefile==2024.8.26
Pillow==9.5.0
pluggy @ file:///tmp/build/80754af9/pluggy_1648042572264/work
ply==3.11
protobuf==3.20.3
py @ file:///opt/conda/conda-bld/py_1644396412707/work
pyasn1==0.5.1
pyasn1-modules==0.3.0
pycodestyle==2.9.1
pycparser==2.21
pycryptodome==3.22.0
pydantic==1.10.21
pydocstyle==6.3.0
pydot==2.0.0
pyfiglet==0.8.post1
pyflakes==2.5.0
Pygments==2.17.2
PyInstaller==3.4
PyNaCl==1.5.0
pyparsing==3.1.4
pytest==7.1.2
pytest-asyncio==0.21.2
pytest-cov==4.1.0
pytest-mock==3.11.1
pytest-timeout==2.3.1
pytest-xdist==3.5.0
python-dateutil==2.9.0.post0
PyYAML==6.0.1
requests==2.31.0
rsa==4.7.2
ruamel.yaml==0.18.10
ruamel.yaml.clib==0.2.8
s3transfer==0.2.1
schema==0.7.7
six==1.17.0
smmap==5.0.2
snowballstemmer==2.2.0
toml==0.10.2
tomli @ file:///opt/conda/conda-bld/tomli_1657175507142/work
treelib==1.7.1
typing_extensions @ file:///croot/typing_extensions_1669924550328/work
urllib3==1.25.11
wcwidth==0.2.13
xmltodict==0.14.2
zc.lockfile==3.0.post1
zipp @ file:///croot/zipp_1672387121353/work

name: dvc
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - attrs=22.1.0=py37h06a4308_0
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2022.12.7=py37h06a4308_0
  - flit-core=3.6.0=pyhd3eb1b0_0
  - importlib_metadata=4.11.3=hd3eb1b0_0
  - iniconfig=1.1.1=pyhd3eb1b0_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - packaging=22.0=py37h06a4308_0
  - pip=22.3.1=py37h06a4308_0
  - pluggy=1.0.0=py37h06a4308_1
  - py=1.11.0=pyhd3eb1b0_0
  - pytest=7.1.2=py37h06a4308_0
  - python=3.7.16=h7a1cb2a_0
  - readline=8.2=h5eee18b_0
  - setuptools=65.6.3=py37h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - tomli=2.0.1=py37h06a4308_0
  - typing_extensions=4.4.0=py37h06a4308_0
  - wheel=0.38.4=py37h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zipp=3.11.0=py37h06a4308_0
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - aliyun-python-sdk-core==2.16.0
      - aliyun-python-sdk-core-v3==2.13.33
      - aliyun-python-sdk-kms==2.16.5
      - altgraph==0.17.4
      - appdirs==1.4.4
      - asciimatics==1.14.0
      - autocommand==2.2.2
      - awscli==1.31.13
      - azure-common==1.1.28
      - azure-nspkg==3.0.2
      - azure-storage-blob==1.3.0
      - azure-storage-common==1.3.0
      - azure-storage-nspkg==3.1.0
      - bcrypt==4.2.1
      - black==19.3b0
      - boto==2.49.0
      - boto3==1.9.115
      - botocore==1.12.253
      - cachetools==5.5.2
      - cffi==1.15.1
      - charset-normalizer==3.4.1
      - click==8.1.8
      - collective-checkdocs==0.2
      - colorama==0.4.4
      - configobj==5.0.9
      - configparser==5.3.0
      - coverage==7.2.7
      - crcmod==1.7
      - cryptography==44.0.2
      - distro==1.9.0
      - docutils==0.15.2
      - dulwich==0.22.1
      - dvc==0.41.1
      - execnet==2.0.2
      - flake8==5.0.4
      - flake8-docstrings==1.7.0
      - flaky==3.8.1
      - future==1.0.0
      - gitdb==4.0.12
      - gitpython==3.1.44
      - google-api-core==1.34.1
      - google-auth==2.38.0
      - google-cloud-core==0.28.1
      - google-cloud-storage==1.13.0
      - google-compute-engine==2.8.13
      - google-crc32c==1.5.0
      - google-resumable-media==2.7.2
      - googleapis-common-protos==1.69.2
      - grandalf==0.6
      - humanize==4.6.0
      - idna==3.10
      - importlib-metadata==4.2.0
      - importlib-resources==5.12.0
      - inflect==6.0.5
      - jaraco-classes==3.2.3
      - jaraco-collections==4.2.0
      - jaraco-context==4.3.0
      - jaraco-functools==3.7.0
      - jaraco-structures==2.1.0
      - jaraco-text==3.11.1
      - jaraco-ui==2.3.0
      - jaraco-windows==3.9.2
      - jmespath==0.10.0
      - jsonpath-ng==1.7.0
      - macholib==1.16.3
      - mccabe==0.7.0
      - mock==5.2.0
      - mock-ssh-server==0.9.1
      - more-itertools==9.1.0
      - nanotime==0.5.2
      - networkx==2.6.3
      - oss2==2.6.1
      - paramiko==3.5.1
      - path==16.6.0
      - path-py==12.5.0
      - pefile==2024.8.26
      - pillow==9.5.0
      - ply==3.11
      - protobuf==3.20.3
      - pyasn1==0.5.1
      - pyasn1-modules==0.3.0
      - pycodestyle==2.9.1
      - pycparser==2.21
      - pycryptodome==3.22.0
      - pydantic==1.10.21
      - pydocstyle==6.3.0
      - pydot==2.0.0
      - pyfiglet==0.8.post1
      - pyflakes==2.5.0
      - pygments==2.17.2
      - pyinstaller==3.4
      - pynacl==1.5.0
      - pyparsing==3.1.4
      - pytest-asyncio==0.21.2
      - pytest-cov==4.1.0
      - pytest-mock==3.11.1
      - pytest-timeout==2.3.1
      - pytest-xdist==3.5.0
      - python-dateutil==2.9.0.post0
      - pyyaml==6.0.1
      - requests==2.31.0
      - rsa==4.7.2
      - ruamel-yaml==0.18.10
      - ruamel-yaml-clib==0.2.8
      - s3transfer==0.2.1
      - schema==0.7.7
      - six==1.17.0
      - smmap==5.0.2
      - snowballstemmer==2.2.0
      - toml==0.10.2
      - treelib==1.7.1
      - urllib3==1.25.11
      - wcwidth==0.2.13
      - xmltodict==0.14.2
      - zc-lockfile==3.0.post1
prefix: /opt/conda/envs/dvc

tests/func/test_data_cloud.py::TestDataCloud::test tests/func/test_data_cloud.py::TestRemoteLOCAL::test tests/func/test_data_cloud.py::TestRemoteSSHMocked::test tests/func/test_data_cloud.py::TestRecursiveSyncOperations::test
tests/func/test_data_cloud.py::TestDataCloudCLIBase::test tests/func/test_data_cloud.py::TestCompatRemoteLOCALCLI::test tests/func/test_data_cloud.py::TestRemoteLOCALCLI::test tests/func/test_data_cloud.py::TestDataCloudErrorCLI::test_error tests/func/test_data_cloud.py::TestWarnOnOutdatedStage::test tests/func/test_data_cloud.py::TestCheckSumRecalculation::test tests/func/test_data_cloud.py::TestShouldWarnOnNoChecksumInLocalAndRemoteCache::test
dvc/config.py dvc/repo/__init__.py dvc/data_cloud.py dvc/remote/local/slow_link_detection.py
dvc/config.py dvc/repo/__init__.py dvc/data_cloud.py dvc/remote/local/slow_link_detection.py