kaggle notebook中免密码进行push

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接: https://blog.csdn.net/appleyuchi/article/details/102769909

下面的都是都是kaggle notebook中运行的。

运行下面的代码:

!rm -r /kaggle/working/RSNA_MODEL
!git clone https://github.com/appleyuchi/RSNA_MODEL
!git config --global user.email [email protected]
!git config --global user.name appleyuchi
!git config --global credential.helper store
!git config --global push.default simple   

print("------------------------")
!cd RSNA_MODEL;touch passwords;git add *;git commit --allow-empty-message -m '';git push https://appleyuchi:自己的密码@github.com/appleyuchi/RSNA_MODEL.git --all
# !cd RSNA_MODEL;git push -f origin master

上面的代码运行之后,下面进行测试:

!cd RSNA_MODEL;touch passwords;git add *;git commit --allow-empty-message -m '';git push

此时就可以发现不再需要密码就可以直接git push

猜你喜欢

转载自blog.csdn.net/appleyuchi/article/details/102769909