private function is_repo_private( $url ) {
		// Used when updating.
		$slug = isset( $_REQUEST['rollback'], $_REQUEST['plugin'] ) ? dirname( $_REQUEST['plugin'] ) : false;
		$slug = isset( $_REQUEST['rollback'], $_REQUEST['theme'] ) ? $_REQUEST['theme'] : $slug;
		$slug = isset( $_REQUEST['slug'] ) ? $_REQUEST['slug'] : $slug;

		if ( $slug && array_key_exists( $slug, static::$options ) &&
			1 === (int) static::$options[ $slug ] &&
			false !== stripos( $url, $slug )
		) {
			return true;
		}

		// Used for remote install tab.
		if ( isset( $_POST['option_page'], $_POST['is_private'] ) &&
			'github_updater_install' === $_POST['option_page']
		) {
			return true;
		}

		// Used for refreshing cache.
		foreach ( array_keys( static::$options ) as $option ) {
			if ( 1 === (int) static::$options[ $option ] &&
				false !== strpos( $url, $option )
			) {
				return true;
			}
		}

		return false;
	}