我想跟随Michael Hartl的Rails教程,但我遇到了一个错误.
我在Github上注册并发布了一个新的SSH密钥并创建了一个新的存储库.但是当我进入终端的下一行时,我收到以下错误:
Parkers-MacBook-Pro:.ssh ppreyer$ git remote add origin git@github.com:ppreyer/first_app.git
fatal: remote origin already exists.
Run Code Online (Sandbox Code Playgroud)
只是想知道是否有其他人遇到过这个问题?
尝试对我的GitHub存储库执行"git push"时,我回到了一个不寻常的错误:
Counting objects: 8, done. Delta compression using 2 threads. Compressing objects: 100% (4/4), done. Writing objects: 100% (5/5), 1.37 KiB, done. Total 5 (delta 2), reused 0 (delta 0) error: insufficient permission for adding an object to repository database ./objects fatal: failed to write object error: unpack-objects exited with error code 128 error: unpack failed: unpack-objects abnormal exit To git@github.com:bixo/bixo.git ! [remote rejected] master -> master (n/a (unpacker error)) error: failed to push some refs to 'git@github.com:bixo/bixo.git'
我们在linode上有一个VPS,在gitHub上有代码.我们如何设置,当我们推送到gitHub时,它也会自动推送到我们的linode服务器.我们在linode服务器上使用PHP.
谢谢.
我正在尝试将 gitlab CI 集成到我的节点项目上,我有 SSH 访问权限,但我的脚本因错误而停止:
fatal: could not read Username for 'https://gitlab.com': No such device or address
debug2: channel 0: written 83 to efd 7
debug3: channel 0: will not send data after close
debug2: channel 0: obuf empty
debug2: channel 0: chan_shutdown_write (i3 o1 sock -1 wfd 6 efd 7 [write])
debug2: channel 0: output drain -> closed
debug2: channel 0: almost dead
debug2: channel 0: gc: notify user
debug2: channel 0: gc: user detached
debug2: channel 0: …Run Code Online (Sandbox Code Playgroud) 我在笔记本电脑(OSX)上有一个裸露的本地git存储库,可以将它当作位于远程桌面(RDP)上的远程(Window 7)虚拟机上的克隆的来源。
首先,我在RDP配置中重定向了笔记本电脑存储库文件夹,因此它看起来像是虚拟机的文件夹。有了这个,我可以从笔记本电脑存储库中克隆和提取文件了。但是当我尝试推送时,出现以下错误:
C:\Proj\repo>git push origin
Counting objects: 9, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (9/9), done.
remote: error: insufficient permission for adding an object to repository database ./objects
remote: fatal: failed to write object
fatal: sha1 file '<stdout>' write error: Broken pipe
error: failed to push some refs to '//tsclient/bare_for_rdp'
Run Code Online (Sandbox Code Playgroud)
尽管有错误,但我认为这不是笔记本电脑上的权限问题,因为我使整个目录世界都可写。(chmod -R a+w *)。看到这个帖子
另外,由于没有特别大的文件,因此我认为断开的管道与缓冲区大小问题无关。
关于如何使它起作用的任何想法?
表演时:
$ git push -u origin --all
Run Code Online (Sandbox Code Playgroud)
我收到一个错误:
remote: error: insufficient permission for adding an object to repository database ./objects
Run Code Online (Sandbox Code Playgroud)
我搜索了一下,并找到了Richard Hansen的解决方案。
我必须执行:
$ git config core.sharedRepository group
Run Code Online (Sandbox Code Playgroud)
相反,我将其执行为:
$ git config core.sharedRepository dev
Run Code Online (Sandbox Code Playgroud)
因为我以为我必须在实际命令中输入组的名称(此处“ dev”是具有用户的组的名称,名为“ gituser”)。
从那时起,每当我尝试在Git Bash中执行任何命令时,都说:
fatal: bad numeric config value 'dev' for 'core.sharedrepository' in .git/config: invalid unit
Run Code Online (Sandbox Code Playgroud)
为此,我也在此链接中找到了解决方案
其中说:
当您为git config core.sharedRepository输入无效值时,它可能会连续失败,而不是让您使用此命令再次更新:
Run Code Online (Sandbox Code Playgroud)git core.sharedRepository group在这种情况下,您将需要打开.git / config文件并手动更改文件,如下所示:
Run Code Online (Sandbox Code Playgroud)[core] ... sharedRepository = group
我做到了,但徒劳无功。仍然Git Bash中的任何命令都给出相同的错误:
fatal: bad numeric config value 'dev' for …Run Code Online (Sandbox Code Playgroud) 嗨,当我尝试在 Jenkins 中构建我的项目时遇到此错误。
Started by user jenkins
Building in workspace /var/lib/jenkins/workspace/booking-widget-api
> git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
> git config remote.origin.url https://xxx@bitbucket.org/yyy/repo-name.git # timeout=10
Fetching upstream changes from https://xxx@bitbucket.org/yyy/repo-name.git
> git --version # timeout=10
using GIT_ASKPASS to set credentials
> git fetch --tags --progress https://xxx@bitbucket.org/yyy/repo-name.git +refs/heads/*:refs/remotes/origin/*
ERROR: Error fetching remote repo 'origin'
hudson.plugins.git.GitException: Failed to fetch from https://xxx@bitbucket.org/yyy/repo-name.git
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:888)
at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1155)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1186)
at hudson.scm.SCM.checkout(SCM.java:504)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1208)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:574)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
at …Run Code Online (Sandbox Code Playgroud) 在 OVM Ubuntu 上运行 git,检查有效凭证时一切正常:
\n\ngit config user.name \nroland \nRun Code Online (Sandbox Code Playgroud)\n\n但是当我尝试提交时
\n\n git commit \xe2\x80\x93m \xe2\x80\x9cadd an \xe2\x80\x98about\xe2\x80\x99 page\nRun Code Online (Sandbox Code Playgroud)\n\n我收到错误消息:
\n\n fatal: could not open \xe2\x80\x98.git/COMMIT_EDITMSG\xe2\x80\x99: Permission denied\nRun Code Online (Sandbox Code Playgroud)\n\n当我运行 git log 时,我看到以前的提交已归因于
\n\n Author: root<root@mymodem.box>\nRun Code Online (Sandbox Code Playgroud)\n\n关于如何启用提交的作者身份等的任何线索?\n此问题出现在完全本地环境中。谢谢。
\n