By means of ab initio calculations we study the effect of O-doping of Au
chains containing a nanocontact represented by a Ni atom as a magnetic
impurity. In contrast to pure Au chains, we find that with a minimun O-doping
the $5d_{xz,yz}$ states of Au are pushed up, crossing the Fermi level. We also
find that for certain O configurations, the Ni atom has two holes in the
degenerate $3d_{xz,yz}$ orbitals, forming a spin $S=1$ due to a large Hund
interaction. The coupling between the $5d_{xz,yz}$ Au bands and the
$3d_{xz,yz}$ of Ni states leads to a possible realization of a two-channel
$S=1$ Kondo effect. While this kind of Kondo effect is commonly found in bulk
systems, it is rarely observed in low dimensions. The estimated Kondo scale of
the system lies within the present achievable experimental resolution in
transport measurements. Another possible scenario for certain atomic
configurations is that one of the holes resides in a $3d_{z^2}$ orbital,
leading to a two-stage Kondo effect, the second one with SU(4) symmetry