2012-12-21 193 views
1

我新來的Git,所以我想學習git。同時當我工作的混帳,GitHub推送只讀

ERROR: Permission to username/file.git denied to Username1. fatal: Could not read from remote repository.

請確保您有正確的訪問權限 和庫中存在。

我遇到此錯誤。順便說一下,文件只能讀取。我該如何推?

  • 混帳克隆[email protected]:用戶名/ file.git
  • 混帳添加Files.txt
  • git的補充。
  • git的承諾-a -m 「第二次提交」
  • 混帳推[email protected]:用戶名/ file.git

順便說一句混帳配置

[core] 
repositoryformatversion = 0 
filemode = true 
bare = false 
logallrefupdates = true 
ignorecase = true 
precomposeunicode = false 
[remote "origin"] 
url = [email protected]:username/files.git 
fetch = +refs/heads/*:refs/remotes/origin/* 
[branch "master"] 
remote = origin 
merge = refs/heads/master 
+0

推請出示你做的步驟。 – Kjuly

+0

git clone [email protected]:username/file.git git add Files.txt git add。 git commit -a -m「第二次提交」 git push [email protected]:username/file.git – SemihY

回答

1

如果你想爲了克隆其他人的回購併爲其做出貢獻,您需要將回購作爲您自己的第一手。將提交推送到您自己的回購站,然後您可以向原作者發送「合併請求」。

git clone [email protected]:username/file.git 

這裏username一定是你,或者一個組織,你是在,否則,您不必更新回購權限。


B.t.w,給你一個提示。您可以

$ git remote add origin [email protected]:username/file.git 
$ git push -u origin master 

從那時起,你可以簡單地通過

$ git push