Physical-layer key generation (PKG) can generate symmetric keys between two communication ends based on the reciprocal uplink and downlink channels. By smartly reconfiguring the radio signal propagation, intelligent reflecting surface (IRS) is able to improve the secret key rate of PKG. However, existing works involving IRS-assisted PKG are concentrated in single-antenna wireless networks. So this paper investigates the problem of PKG in the IRS-assisted multiple-input single-output (MISO) system, which aims to maximize the secret key rate by optimally designing the IRS passive beamforming. First, we analyze the correlation between channel state information (CSI) of eavesdropper and legitimate ends and derive the expression of the upper bound of secret key rate under passive eavesdropping attack. Then, an optimal algorithm for designing IRS reflecting coefficients based on Semi-Definite Relaxation (SDR) and Taylor expansion is proposed to maximize the secret key rate. Numerical results show that our optimal IRS-assisted PKG scheme can achieve much higher secret key rate when compared with two benchmark schemes.