diff --git a/readthedocs/doc_builder/director.py b/readthedocs/doc_builder/director.py
index 11de6c27b4f..ad842e4bdc7 100644
--- a/readthedocs/doc_builder/director.py
+++ b/readthedocs/doc_builder/director.py
@@ -8,6 +8,7 @@
* fetching instructions etc.
"""
+import datetime
import os
import tarfile
@@ -216,12 +217,20 @@ def checkout(self):
self.data.api_client.project(self.data.project.pk).patch(
{"has_ssh_key_with_write_access": has_ssh_key_with_write_access}
)
+
+ now = datetime.datetime.now(tz=datetime.timezone.utc)
+ hard_failure = now >= datetime.datetime(
+ 2025, 12, 1, 0, 0, 0, tzinfo=datetime.timezone.utc
+ )
if has_ssh_key_with_write_access:
- self.attach_notification(
- attached_to=f"project/{self.data.project.pk}",
- message_id=MESSAGE_PROJECT_SSH_KEY_WITH_WRITE_ACCESS,
- dismissable=True,
- )
+ if hard_failure and settings.RTD_ENFORCE_BROWNOUTS_FOR_DEPRECATIONS:
+ raise BuildUserError(BuildUserError.SSH_KEY_WITH_WRITE_ACCESS)
+ else:
+ self.attach_notification(
+ attached_to=f"project/{self.data.project.pk}",
+ message_id=MESSAGE_PROJECT_SSH_KEY_WITH_WRITE_ACCESS,
+ dismissable=True,
+ )
identifier = self.data.build_commit or self.data.version.identifier
log.info("Checking out.", identifier=identifier)
diff --git a/readthedocs/notifications/messages.py b/readthedocs/notifications/messages.py
index a2018b91983..d93cfdf1d04 100644
--- a/readthedocs/notifications/messages.py
+++ b/readthedocs/notifications/messages.py
@@ -226,7 +226,7 @@ def get_rendered_body(self):
"""
This build has failed because the current deploy key on the repository was created with write permission.
For protection against abuse we've restricted use of these deploy keys.
- A read-only deploy key will need to be set up before July 31, 2025 to continue building this project.
+ A read-only deploy key will need to be set up before December 1st, 2025 to continue building this project.
Read more about this in our blog post.
"""
).strip(),
diff --git a/readthedocs/projects/notifications.py b/readthedocs/projects/notifications.py
index 9b9e5d43e7a..a6bd1085308 100644
--- a/readthedocs/projects/notifications.py
+++ b/readthedocs/projects/notifications.py
@@ -186,7 +186,7 @@
"""
This project has a deploy key with write access to the repository.
For protection against abuse we've restricted use of these deploy keys.
- A read-only deploy key will need to be set up before July 31, 2025 to continue building this project.
+ A read-only deploy key will need to be set up before December 1st, 2025 to continue building this project.
Read more about this in our blog post.
"""
).strip(),