diff --git a/.circleci/merge_base_branch.sh b/.circleci/merge_base_branch.sh
index 4e297d77da072e09cc31096e26e62c09ade3b262..9614eb91b6fb7aac8652b6061f2e4dc3739c1763 100755
--- a/.circleci/merge_base_branch.sh
+++ b/.circleci/merge_base_branch.sh
@@ -19,6 +19,10 @@ GITBASE=`curl -q https://api.github.com/repos/matrix-org/synapse/pulls/${CIRCLE_
 # Show what we are before
 git show -s
 
+# Set up username so it can do a merge
+git config --global user.email bot@matrix.org
+git config --global user.name "A robot"
+
 # Fetch and merge. If it doesn't work, it will raise due to set -e.
 git fetch -u origin $GITBASE
 git merge --no-edit origin/$GITBASE
diff --git a/changelog.d/3858.misc b/changelog.d/3858.misc
new file mode 100644
index 0000000000000000000000000000000000000000..4644db5330fc89ba4129edcf0200600477003d2e
--- /dev/null
+++ b/changelog.d/3858.misc
@@ -0,0 +1 @@
+Fix running merged builds on CircleCI
\ No newline at end of file