#svn #bitbucket #git
REAL@BENTLY /c/LS/sites/home/test.loc/www/gallery (master) $ git push -u origin master Password for 'https://nickname@bitbucket.org': error: src refspec master does not match any. error: failed to push some refs to 'https://nickname@bitbucket.org/nickname/jquery-g allery.git' REAL@BENTLY /c/LS/sites/home/test.loc/www/gallery (master) $ git pull origin master Password for 'https://nickname@bitbucket.org': fatal: Couldn't find remote ref master Unexpected end of command stream Что не так, подскажите? [ git status ] REAL@BENTLY /c/LS/sites/home/test.loc/www/gallery (master) $ git status # On branch master # # Initial commit # # Untracked files: # (use "git add..." to include in what will be committed) # # .hg/ # .hgignore # README.md # css/ # index.html # js/ nothing added to commit but untracked files present (use "git add" to track) [ git add . ] REAL@BENTLY /c/LS/sites/home/test.loc/www/gallery (master) $ git add . fatal: LF would be replaced by CRLF in .hg/cache/branchheads [ git remote rm origin ] REAL@BENTLY /c/ls/sites/home/test.loc/www/jquery-gallery (master) $ git remote rm origin REAL@BENTLY /c/ls/sites/home/test.loc/www/jquery-gallery (master) $ git remote add origin git@bitbucket.org:nickname/jquery-gallery.git REAL@BENTLY /c/ls/sites/home/test.loc/www/jquery-gallery (master) $ git push -u origin master The authenticity of host 'bitbucket.org (206.223.241.182)' can't be established. RSA key fingerprint is 97:8c:1b:f2:6f:14:6b:5c:3b:ec:aa:46:46:74:7c:40. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'bitbucket.org,206.223.241.182' (RSA) to the list of known hosts. Permission denied (publickey). fatal: The remote end hung up unexpectedly p.s. ip изменен. [ обновился ] Перенес в другой каталог исходники: REAL@BENTLY /c/localgit/jquery-gallery (master) $ git push -u origin master Permission denied (publickey). fatal: The remote end hung up unexpectedly [ Решение ] Наверное больше для себя чем для кого-то оставлю заметку. В общем дело было в public key, ввел другой public key, который находится в файле C:\Documents and Settings\REAL\.ssh\id_rsa.pub
Ответы
Ответ 1
Вероятно в вашем локальном репозитории не создан refspec для бранча master, т.к. репозиторий пустой. Выполните git status. В результате вы должны получить ответ, наподобие этого: # On branch master nothing to commit (working directory clean) Если ответ не содержит строки "On branch master", то нужно выполнить первый коммит. После этого push должен отработать.Ответ 2
У меня тоже такая фигня случалась когда пытался использовать путь по https. Возможно такая фигня случается если репозиторий приватный и git не использует твои ssh ключи. Удали старый origin и добавь новый с другой урлой: git remote rm origin git remote add origin git@bitbucket.org:nickname/jquery-gallery.git Должно заработать.
Комментариев нет:
Отправить комментарий