  The most popular Gogny parametrizations, namely D1S, D1N and D1M, describe
accurately the ground-state properties of spherical and deformed finite nuclei
all across the mass table obtained with Hartree--Fock--Bogoliubov (HFB)
calculations. However, these forces produce a rather soft equation of state
(EoS) in neutron matter, which leads to predict maximum masses of neutron stars
well below the observed value of two solar masses. To remove this limitation,
we built new Gogny parametrizations by modifying the density dependence of the
symmetry energy predicted by the force in such a way that they can be applied
to the neutron star domain and can also reproduce the properties of finite
nuclei as good as their predecessors. These new parametrizations allow us to
obtain stiffer EoS's based on the Gogny interactions, which predict maximum
masses of neutron stars around two solar masses. Moreover, other global
properties of the star, such as the moment of inertia and the tidal
deformability, are in harmony with those obtained with other well tested EoSs
based on the SLy4 Skyrme force or the Barcelona--Catania--Paris--Madrid (BCPM)
energy density functional. Properties of the core-crust transition predicted by
these Gogny EoSs are also analyzed. Using these new Gogny forces, the EoS in
the inner crust is obtained with the Wigner--Seitz approximation in the
Variational Wigner--Kirkwood approach along with the Strutinsky integral
method, which allows one to estimate in a perturbative way the proton shell and
pairing corrections. For the outer crust, the EoS is determined basically by
the nuclear masses, which are taken from the experiments, wherever they are
available, or by HFB calculations performed with these new forces if the
experimental masses are not known.
