diff --git a/rbtools/clients/git.py b/rbtools/clients/git.py
index 142e5472399f52d3150a8bd52de559d34891e92b..4ef31ca4bf2bb413fd2531664bf617171ad7d822 100644
--- a/rbtools/clients/git.py
+++ b/rbtools/clients/git.py
@@ -1450,7 +1450,10 @@ class GitClient(SCMClient):
         if remote:
             return remote
 
-        all_remotes = self._execute(['git', 'remote'], split_lines=True)
+        all_remotes = [
+            _remote.strip()
+            for _remote in self._execute(['git', 'remote'],
+                                         split_lines=True)]
 
         if len(all_remotes) >= 1:
             # We prefer "origin" if it's present, otherwise just choose at
