Update instances of acme-staging url to acme-staging-v02 (#5734)
diff --git a/certbot/constants.py b/certbot/constants.py
index a6878824b58..9dfc00c6b46 100644
--- a/certbot/constants.py
+++ b/certbot/constants.py
@@ -107,7 +107,7 @@
     dns_route53=False
 
 )
-STAGING_URI = "https://acme-staging.api.letsencrypt.org/directory"
+STAGING_URI = "https://acme-staging-v02.api.letsencrypt.org/directory"
 
 # The set of reasons for revoking a certificate is defined in RFC 5280 in
 # section 5.3.1. The reasons that users are allowed to submit are restricted to
diff --git a/certbot/tests/storage_test.py b/certbot/tests/storage_test.py
index 6c0970e7202..09c752ebe6b 100644
--- a/certbot/tests/storage_test.py
+++ b/certbot/tests/storage_test.py
@@ -726,7 +726,7 @@ def test_is_test_cert(self):
         self.test_rc.configuration["renewalparams"] = {}
         rp = self.test_rc.configuration["renewalparams"]
         self.assertEqual(self.test_rc.is_test_cert, False)
-        rp["server"] = "https://acme-staging.api.letsencrypt.org/directory"
+        rp["server"] = "https://acme-staging-v02.api.letsencrypt.org/directory"
         self.assertEqual(self.test_rc.is_test_cert, True)
         rp["server"] = "https://staging.someotherca.com/directory"
         self.assertEqual(self.test_rc.is_test_cert, True)
diff --git a/certbot/tests/testdata/sample-renewal.conf b/certbot/tests/testdata/sample-renewal.conf
index 52b3ec45cc5..04f9ae8ca20 100644
--- a/certbot/tests/testdata/sample-renewal.conf
+++ b/certbot/tests/testdata/sample-renewal.conf
@@ -61,7 +61,7 @@ chain_path = /home/ubuntu/letsencrypt/chain.pem
 break_my_certs = False
 standalone = True
 manual = False
-server = https://acme-staging.api.letsencrypt.org/directory
+server = https://acme-staging-v02.api.letsencrypt.org/directory
 standalone_supported_challenges = "tls-sni-01,http-01"
 webroot = False
 os_packages_only = False
diff --git a/docs/contributing.rst b/docs/contributing.rst
index 654528e3db5..45cd2e9f2d4 100644
--- a/docs/contributing.rst
+++ b/docs/contributing.rst
@@ -43,7 +43,7 @@ each shell where you're working:
 .. code-block:: shell
 
    source ./venv/bin/activate
-   export SERVER=https://acme-staging.api.letsencrypt.org/directory
+   export SERVER=https://acme-staging-v02.api.letsencrypt.org/directory
    source tests/integration/_common.sh
 
 After that, your shell will be using the virtual environment, your copy of
@@ -443,10 +443,10 @@ For squeeze you will need to:
 FreeBSD
 -------
 
-Packages can be installed on FreeBSD using ``pkg``, 
-or any other port-management tool (``portupgrade``, ``portmanager``, etc.) 
-from the pre-built package or can be built and installed from ports. 
-Either way will ensure proper installation of all the dependencies required 
+Packages can be installed on FreeBSD using ``pkg``,
+or any other port-management tool (``portupgrade``, ``portmanager``, etc.)
+from the pre-built package or can be built and installed from ports.
+Either way will ensure proper installation of all the dependencies required
 for the package.
 
 FreeBSD by default uses ``tcsh``. In order to activate virtualenv (see
diff --git a/examples/dev-cli.ini b/examples/dev-cli.ini
index c02038ca1f8..a405a0aefda 100644
--- a/examples/dev-cli.ini
+++ b/examples/dev-cli.ini
@@ -1,5 +1,5 @@
 # Always use the staging/testing server - avoids rate limiting
-server = https://acme-staging.api.letsencrypt.org/directory
+server = https://acme-staging-v02.api.letsencrypt.org/directory
 
 # This is an example configuration file for developers
 config-dir = /tmp/le/conf

* update instances of acme-staging url to acme-staging-v02

* keep example client as v1

* keep deactivate script as v1

(cherry picked from commit 5ecb68f2ed41474d65f70d309d2bd05c61fd6faf)