The results of a study of the short gamma-ray burst GRB 231115A in the X-ray and gamma-ray ranges are presented, based on data from the INTEGRAL and Fermi space observatories. The source of the burst is localized by the IBIS/ISGRI telescope of INTEGRAL observatory with an accuracy of ({leq}1.!!^{prime}5), it is located in the Cigar Galaxy (M 82). Early follow-up observations of the burst localization region were carried out in the optical range with the 36-cm telescope of the ISON-Kitab observatory and the 70-cm telescope AS-32 of the Abastumani Astrophysical Observatory. The optical emission has not been detected. The proximity of the host galaxy ((D_{L}simeq 3.5) Mpc) significantly limits energetics of the event ((E_{textrm{iso}} sim 10^{45}) erg) and allows us to interpret the burst as a giant flare of a previously unknown soft gamma repeater (SGR) which is an extreme manifestation of the activity of a highly magnetized neutron star (magnetar). This conclusion is confirmed by the energy spectrum atypically hard for cosmological gamma-ray bursts, as well as the absence of optical afterglow and gravitational wave signal, which should have been detected in the LIGO/Virgo/KAGRA experiments if the burst was caused by a merger of binary neutron stars. The location of the burst in the (E_{p,i}{-}E_{textrm{iso}}) and (T_{90,i}{-}EH) diagrams also suggests that GRB 231115A was a magnetar giant flare. This is the first well-localized giant flare of an extragalactic SGR.