日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > Android >内容正文

Android

【错误记录】Android Studio 向 GitHub 提交代码报错 ( Push failed: Failed with error: Could not read | 使用命令行提交代码 )

發布時間:2025/6/17 Android 21 豆豆
生活随笔 收集整理的這篇文章主要介紹了 【错误记录】Android Studio 向 GitHub 提交代码报错 ( Push failed: Failed with error: Could not read | 使用命令行提交代码 ) 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

文章目錄

  • 一、報錯信息
  • 二、解決方案





一、報錯信息



在 Android Studio 中首次向 GitHub 提交代碼 , 報錯 :

Push failed: Failed with error: Could not read from remote repository.





二、解決方案



如果在 Android Studio 中使用可視化界面提交失敗 ;

考慮使用 Git 命令提交 ;

進入 Terminal 面板 , 進入工程根目錄 , 執行如下命令 , 即可向 GitHub 提交代碼 ;

git push --set-upstream origin master

完整過程 :

Microsoft Windows [版本 10.0.19041.1288] (c) Microsoft Corporation。保留所有權利。Y:\002_WorkSpace\001_AS\VA_Original\VirtualApp-master\VirtualApp>git status On branch master nothing to commit, working tree cleanY:\002_WorkSpace\001_AS\VA_Original\VirtualApp-master\VirtualApp>git push fatal: The current branch master has no upstream branch. To push the current branch and set the remote as upstream, usegit push --set-upstream origin masterY:\002_WorkSpace\001_AS\VA_Original\VirtualApp-master\VirtualApp>git push --set-upstream origin master The authenticity of host 'github.com (52.74.223.119)' can't be established. RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8. Are you sure you want to continue connecting (yes/no/[fingerprint])? yes Warning: Permanently added 'github.com,52.74.223.119' (RSA) to the list of known hosts. Enumerating objects: 1239, done. Counting objects: 100% (1239/1239), done. Delta compression using up to 12 threads Compressing objects: 100% (1156/1156), done. Writing objects: 100% (1239/1239), 1.90 MiB | 908.00 KiB/s, done. Total 1239 (delta 213), reused 0 (delta 0) remote: Resolving deltas: 100% (213/213), done. To github.com:han1202012/VirtualApp.git* [new branch] master -> master Branch 'master' set up to track remote branch 'master' from 'origin'.Y:\002_WorkSpace\001_AS\VA_Original\VirtualApp-master\VirtualApp>

GitHub 顯示代碼提交完成 ;

UI 可視化提交失敗 , 可以考慮使用命令提交代碼 ;

總結

以上是生活随笔為你收集整理的【错误记录】Android Studio 向 GitHub 提交代码报错 ( Push failed: Failed with error: Could not read | 使用命令行提交代码 )的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。