初始化svn目录,提示参数svn检出文件不存在在,该怎么解决

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
您的访问请求被拒绝 403 Forbidden - ITeye技术社区
您的访问请求被拒绝
亲爱的会员,您的IP地址所在网段被ITeye拒绝服务,这可能是以下两种情况导致:
一、您所在的网段内有网络爬虫大量抓取ITeye网页,为保证其他人流畅的访问ITeye,该网段被ITeye拒绝
二、您通过某个代理服务器访问ITeye网站,该代理服务器被网络爬虫利用,大量抓取ITeye网页
请您点击按钮解除封锁&不错的git笔记博客:
/wanqieddy/category/406859.html
http://blog.csdn.net/zxncvb/article/details/
Git学习教程(六)Git日志
http://my.oschina.net/xdev/blog/114383
Git详解之三:Git分支
svn:&/opt/svndata/repos/conf/svnserve.conf:12:&Option&expected
原因:svn不识别配置文件中&开头带空格的参数权限配置:
#分组:[groups]group_admin = wws,aaa,bbbgroup_user1 = sj,cccgroup_user2 = sy,dd,eeeegroup_user3 = lxtgroup_user4 = ss#设置对根(即SVN)目录下,所有版本库的访问权限[/]* = r #所有登录用户默认权限为只读@group_admin = rw #可以分配给组,该组有读写权限wws = rw #也可以像这样分配给指定用户在修改配置文件(authz)后,客户端可能会报&Invalid authz configuration&的错误提示!客户端没有提示错误原因,但在服务器端有一个方法,可以检查配置文件(authz)错在了哪里;具体方法如下:root@server:~#&svnauthz-validate&/data/svn/LQPLAY/conf/authzsvnauthz-validate: /data/svn/LQPLAY/conf/authz:167: Option must end with ':' or '='它查出了是配置文件(authz)的第167行,出现了错误。然后,可以用如下命令,编辑它并保存:root@server:~#&vi&/data/svn/LQPLAY/conf/authzShift+:&set number&& & & & &(显示行号)Shift+:&167&& & & & & &(直接跳转到167行)我发现是本该写为(gaojs = rw),不小心写成了(gaojs - rw)。字母键(I-Insert),从浏览模式,切换到插入模式;(Shift+:, 从浏览模式,切换到底行命令模式)(Esc,从其他模式,退出到浏览模式)修改后保存退出!Shift+:&wq& & & & & & &(Write & Quit)
查看SVN的目录在哪里?root@server:~#&whereis svnsvn: /usr/bin/svn /usr/bin/X11/svn /usr/share/man/man1/svn.1.gz查看SVN的进程是哪些?root@server:~#&ps aux | grep svn &&& & & & & &&root & & & &0.0 &6 ? & & & &Ss & 10:53 & 0:00&svnserve -d -r /data/svn/LQPLAYroot & & & &0.0 &13592 & 936 pts/2 & &S+ & 11:58 & 0:00 grep --color=auto svn启动SVN的服务(-d:D -r:Root)root@server:~#&svnserve -d -r /data/svn/LQPLAY查看SVN的服务是否正常(端口号3690是否存在)root@server:~#&netstat -ntlpActive Internet connections (only servers)Proto Recv-Q Send-Q Local Address & & & & & Foreign Address & & & & State & & & PID/Program nametcp & & & &0 & & &0 0.0.0.0:3690&& & & & & &0.0.0.0:* & & & & & & & LISTEN & & &1527/svnserve&
1、checkout时,提示:URL svn://192.168.1.99/svntest doesn't exist...
奇怪,怎么会提示库不存在呢?肯定是哪里配置问题。后来尝试了半天,也在网上搜索了很久,终于发现问题所在。
如果你的svn库的路径为:/home/svn/svntest
那么你启动时,不能用命令:
svnserve -d -r /home/svn/svntest
而要用命令:
svnserve -d -r /home/svn/
2、commit时,提示:Authorization failed
开始一直以为是authz文件配置得不对,一直尝试,一直修改,还是不行,郁闷了。在确定authz的配置完全没问题后,开始查其它两个配置文件的问题。后来终于发现问题出在svnserve.conf这个文件。以下四行:
# anon-access = read
# auth-access = write
# password-db = passwd
# authz-db = authz
是被注释掉的,虽然文件说明里面说默认就是按注释掉的配置来执行,但好像并不是这样。放开注释:
anon-access = read
auth-access = write
password-db = passwd
authz-db = authz
问题解决。
PS:有些童鞋问文件上传到服务器后存放在服务器的哪个地方。
答:一般放在/home/svn/svntest/db/revs(根据我自己的目录结构)里面
svn服务未启动或者是启动的时候未指定svn仓库路径
使用如下命令:
sudo svnserve -d -r /var/svn
后面的目录是你svn服务的仓库路径
另外要使用sudo取得管理员权限,否则可能在提交代码的时候出现权限问题
1、git commit
此时是进入GUN nano编辑器。在这里可以添加你的commit imformation 然后ctrl+o,回车保存,再ctrl+x退出。
因为对Nano编辑器很不熟悉,在这里我想将默认编辑器改为vim。打开.git/config文件,在core中添加 editor=vim即可。
或者运行命令&git config &global core.editor vim 修改更加方便。
2、git commit -a
把所有add了的文件都加入commit,然后进入编辑器编辑commit信息。
3、git commit -m &&commit imformation&
直接在后面添加commit 信息然后提交commit,与gitcommit相比快捷方便,但是就是commit信息格式无法控制。
4、git commit --amend&
修改最后一次commit的信息
git config运用
本文中所演示的git操作都是在v1.7.5.4版本下进行的,不同的版本会有差异,更老的版本有些选项未必支持。
当我们安装好git软件包,或者着手在一个新的机子上使用git的时候,我们首先需要进行一些基本的配置工作,这个就要用到git config。
git config是用于进行一些配置设置,有三种不同的方式来指定这些配置适用的范围:
1) git config & & & & & & 针对一个git仓库
2) git config --global & &针对一个用户
3) sudo git config --system & &针对一个系统,因为是针对整个系统的,所以必须使用sudo
1) 第一种默认当前目录是一个git仓库,假设我们有一个仓库叫git_test,它所修改配置保存在git_test/.git/config文件,如果当前目录不是一个有效的git仓库,在执行?一些命令时会报错,例如:
$git config -e
fatal: not in a git directory
我们来看一个简单的例子,一般我们clone一个git仓库,默认都是一个工作目录,那么对应的配置变量 bare = false。来看一个很简单的仓库的config文件,cat git_test/.git/config
& & & & repositoryformatversion = 0
& & & & filemode = true
& & & & bare = false
& & & & logallrefupdates = true
如果我们想修改bare为false,最简单的办法就是直接用vim打开git_test/.git/config文件进行修改,另一种办法就是使用git config来修改
$git config core.bare true
$cat .git/config
& & & & repositoryformatversion = 0
& & & & filemode = true
& & & & bare = true
& & & & logallrefupdates = true
命令的格式就是 git config &section&.&key& &value&。需要注意的是我们没有加--system和--global,那么这个修改只针对于当前git仓库,其它目录的仓库不受影响。
2) 第2种是适用于当前用户,也就是说只要是这个用户操作任何git仓库,那么这个配置都会生效,这种配置保存在~/.gitconfig当中,那什么样的配置需要放到用户的配置文件里呢,git里一个最为重要的信息就是提交者的个人信息,包括提交者的名字,还有邮箱。当我们在用git提交代码前,这个是必须要设置的。显而易见,这个配置需要放在用户一级的配置文件里。
$git config --global user.name "I Love You"
$git config --global user.email "i.love."
$cat ~/.gitconfig
& & & & name = I Love You
& & & & email = i.love.
3) 第3种是适用于一个系统中所有的用户,也就是说这里的配置对所有用户都生效,那什么样的配置需要放在这里呢,比如我们在执行git commit会弹出一个默认的编辑器,一般是vim,那作为系统的管理员,可以将vim设置为所有用户默认使用的编辑器,我们来看设置的过程
$sudo git config --system core.editor vim
$cat /etc/gitconfig
[core] & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & &&
& & & & editor = vim
我们可以看到它修改的是全局的配置文件/etc/gitconfig。
现在我们就会有一个问题,当我们在不同的配置文件中,对同一个变量进行了设置,最终哪个会生效呢?或者说谁到底覆盖谁呢?先来排除一种情况,就是分属不同的两个git仓库的config文件中的配置是互不影响的,这个很好理解。那么要讨论是如果一个配置出即出现在/etc/gitconfig,~/.gitconfig以及git_test/.git/config这三个位置时,我们又恰巧要操作git仓库git_test,那么生效的优先级顺序是(1)git_test/.git/config,(2)~/.gitconfig,(3)/etc/gitconfig,也就是说如果同一个配置同时出现在三个文件中时,(1)有效。
那么为什么会有这样的情况发生呢,比如我们前面的有关编辑器设置,系统管理员为所有用户设置了默认的编辑器是vim,但是并不是每个用户都习惯用vim,有些人更青睐于功能更炫的emacs(I hate it,我刚刚接触linux的时候上来就是用的emacs,让我这个新手不知所措,但是后来使了vim,觉得更容易上手,而且用的时间长了,对vim了解更深,发现它功能一样强大,而且它可以算是类unix系统中默认的编辑器),言归正传,如果你想用emacs,你就可以将这个配置加入到你的~/.gitconfig中,这样它就会覆盖系统/etc/gitconfig的配置,当然这只针对于你,其他用户如果不设置还是会用vim。
$git config --global core.editor emacs
$cat ~/.gitconfig
& & & & editor = emacs
对于git config只介绍到这,其实除了以上讲解的部分,它还有很多功能。本文中主要是针对介绍不同范围内设置的配置的有效范围,了解它之后,当以后需要对git进行环境配置时,你就明白根据当前配置的性质,明白是该放在git_test/.git/config,还是在~/.gitconfig,又或是在/etc/gitconfig中,作为一个资深的版本管理者来说,必须要了解以上的区别。
在使用Git Push代码到数据仓库时,提示如下错误:
[remote rejected] master -& master (branch is currently checked out)
remote: error: refusing to update checked out branch: refs/heads/master
remote: error: By default, updating the current branch in a non-bare repository
remote: error: is denied, because it will make the index and work tree inconsistent
remote: error: with what you pushed, and will require 'git reset --hard' to match
remote: error: the work tree to HEAD.
remote: error:
remote: error: You can set 'receive.denyCurrentBranch' configuration variable to
remote: error: 'ignore' or 'warn' in the remote repository to allow pushing into
remote: error: however, this is not recommended unless you
remote: error: arranged to update its work tree to match what you pushed in some
remote: error: other way.
remote: error:
remote: error: To squelch this message and still keep the default behaviour, set
remote: error: 'receive.denyCurrentBranch' configuration variable to 'refuse'.
To git@192.168.1.X:/var/git.server/.../web
! [remote rejected] master -& master (branch is currently checked out)
error: failed to push some refs to 'git@192.168.1.X:/var/git.server/.../web'
这是由于git默认拒绝了push操作,需要进行设置,修改.git/config文件后面添加如下代码:
[receive]denyCurrentBranch = ignore
无法查看push后的git中文件的原因与解决方法
在初始化远程仓库时最好使用
git --bare init
而不要使用:git init
git init 和git --bare init 的具体区别:
=================================================
如果使用了git init初始化,则远程仓库的目录下,也包含work tree,当本地仓库向远程仓库push时, 如果远程仓库正在push的分支上(如果当时不在push的分支,就没有问题), 那么push后的结果不会反应在work tree上, &也即在远程仓库的目录下对应的文件还是之前的内容。
解决方法:
必须得使用命令 git reset --hard 才能看到push后的内容.
研究了很久不得其解,然后找到一条命令凑合着能用了:
登录到远程的那个文件夹,使用
git config --bool core.bare true
就搞定了。
贴一段参考文章:
Create a bare GIT repository
A small rant: git is unable to create a normal bare repository by itself. Stupid git indeed.
To be precise,&it is not possible to clone empty repositories. So an empty repository is a useless repository. Indeed, you normally create an empty repository and immediately fill it:
git init git add .
However,&git add&is not possible when you create a bare repository:
git --bare init git add .
gives an error "fatal: This operation must be run in a work tree".
You can't check it out either:
Initialized empty Git repository in /home/user/myrepos/.git/ fatal:&&not found: did you run git update-server-info on the server? git --bare init git update-server-info # this creates the info/refs file chown -R &user&:&group& . # make sure others can update the repository
The solution is to create&another repository&elsewhere, add a file in that repository and, push it to the bare repository.
cd temp git init touch .gitignore git add .gitignore git commit -m "Initial commit" git push &url or path of bare repository& master cd ..; rm -rf temp
昨天打算把git diff 关联上bcompare作两个文件对比, 后来发现不怎么好用. 还要弹个gtk的窗口. 于是unset了后.
今天重新git diff的时候, 发现输入后没有任何反应. 就记录下怎么修复的
找了一台可以用git diff的机器, 随便echo 了一个多余的字符进已有的repository, 这里我们用strace来追踪执行过程.
#strace -f -e execve git diff
execve("/usr/bin/git", ["git", "diff"], [
再看看不能执行的
#strace -f -e execve git diff
execve("/usr/bin/git", ["git", "diff"], [
原来是正常的pager给换成了less.&这就简单了,找了下/etc/gitconfig. /root/.gitconfig, /home/username/.gitconfig 以及项目下的.git/config 都没有发现alias pager=less的. 看看git config &list 也没有定义.
想起来改过bashrc, 打开一看, 果然
export PAGER=less
删掉后重新加载terminal, git diff就恢复了正常.
Double Hyphens in Git Diff
Two months ago, I wrote my first list of Git commands, and said that I&didn&t&know how to use Git commands to view the changes.
Now, I can understand how one can &use &--& to separate paths from revisions [or branches]&.
For example, if a developer relies on&&for blogging with Octopress, then he/she will learn some Git commands, for example:
git diff &branch&&to view the
git diff &path&&to show the uncommitted changes in files under&&path&.
Those commands should be enough for most cases. However, if he/she blogs with&, then he/she will encounter the some problems:
git diff source&can&t&view the uncommitted changes on&source& (Click the linked post in&&for the error thrown by Git.)
git diff source&can&t&show the uncommitted changes in files under&source&folder.
In order to use&git diff&to do the intended task, one has to avoid ambiguity.
If necessary, one can use&--&to separate branch name(s) from file/
一个可以使用./source到平均source文件夹。
$ git diff origin/source source
fatal: ambiguous argument 'source': both revision and filename
Use '--' to separate paths from revisions, like this:
'git &command& [&revision&...] -- [&file&...]'
$ git diff origin/source source --
# correct command
$ git diff ./source
# correct command
如果一个想要在 shell 命令中键入,其中一个可以考虑使用: 在一个窗口由调用:Gst,在修改后的文件在哪里显示的线按D&。
将本地test分支push到远程仓库上,如果远程没有就会创建
git push origin test
git checkout test -------》将远程的test分支下载到本地
git checkout -b aa origin/test -----》&将远程的test分支下载到本地,并且切换到本地
阅读(...) 评论()svn update时的错误:internal error无法找到临时目录
&今天公司同事对svn进行更新时,遇到internal error无法找到临时目录,如下图
我直接对svn所在硬盘进行了检查,发现空间还很大,然后在运行里输入C:\Documents and Settings\Administrator\Local Settings\Temp,发现空间居然有100+m,对其进行了删除,然后再svn update,发现svn可以更新了,再给大家个批处理,这样对其删除方便点.
代码如下:
echo 正在清除系统垃圾文件,请稍等......
del /f /s /q %systemdrive%\*.tmp
del /f /s /q %systemdrive%\*._mp
del /f /s /q %systemdrive%\*.log
del /f /s /q %systemdrive%\*.gid
del /f /s /q %systemdrive%\*.chk
del /f /s /q %systemdrive%\*.old
del /f /s /q %systemdrive%\recycled\*.*
del /f /s /q %windir%\*.bak
del /f /s /q %windir%\prefetch\*.*
rd /s /q %windir%\temp & md %windir%\temp
del /f /q %userprofile%\COOKIES s\*.*
del /f /q %userprofile%\recent\*.*
del /f /s /q "%userprofile%\Local Settings\Temporary Internet Files\*.*"
del /f /s /q "%userprofile%\Local Settings\Temp\*.*"
del /f /s /q "%userprofile%\recent\*.*"
sfc /purgecache '清理系统盘无用文件
defrag %systemdrive% -b '优化预读信息
echo 清除系统垃圾完成!
echo. & pause
将上边的彩色代码复制,然后新建一个文本文档 粘贴进去
在另存为".bat"格式的文件,或者在保存类型中选择“批处理文件”
运行即可快速清理系统大量系统垃圾了
夜空- 本站版权
1、本站所有主题由该文章作者发表,该文章作者与享有文章相关版权
2、其他单位或个人使用、转载或引用本文时必须同时征得该文章作者和的同意
3、本帖部分内容转载自其它媒体,但并不代表本站赞同其观点和对其真实性负责
4、如本帖侵犯到任何版权问题,请立即告知本站,本站将及时予与删除并致以最深的歉意
5、原文链接:
大家如果觉得本blog对你有所帮助,请给我一点小小的鼓励,谢谢.
Powered by初始化svn目录,提示参数不存在,该怎么解决_百度知道
初始化svn目录,提示参数不存在,该怎么解决
我有更好的答案
然后应该就恢复正常了在图标混乱的那个磁盘根目录下面有一个隐藏文件夹,就重启一下,找到这个文件夹并删除,文件夹名称为,如果删除后图标还没恢复.svn
其他类似问题
为您推荐:
svn的相关知识
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁初始化svn目录,提示参数不存在,该怎么解决_百度知道
初始化svn目录,提示参数不存在,该怎么解决
SVN客户端;ProgramFiles&#92,在弹出对话框的“URLofrepository”输入“svn:方法一;Subversion三;project1&#47、start也一样.exe的路径一起被包含在一对双引号当中:直接运行按提示安装即可:解压缩包,导入数据选中要上传SVN的文件夹;svnroot&#92:&#92,即常说的小乌龟,start=auto表示开机后自动运行.4,选择“SVNCheckout”。7七;”处理“&&#47。六,depend=Tcpip表示svnserve服务的运行需要tcpip服务:&#92。displayname,可以从官方网站下载最新版本:netstartsvnserve。建立版本库有两种方法.3;depend=Tcpipstart=auto说明一:直接解压缩到某个文件夹下即可:&#92;repos2,在“URLofrepository”中输入“svn:&#92;”号。示例路径:将。2;svnserve.repos1--listen-hostip地址--listen-port=端口号说明:(1)sc是windows自带的服务配置程序;TortoiseSVN-&gt,则执行scdeletesvnserve即可;localhost/svnroot&#92:e,启动SVN服务为后台运行程序;svnserve:&#92,用来与服务器端通讯;CreateRepositoryhere”;&quot:示例路径,svnserve要等下次开机时才会自动运行:&#92.2;c:&#92:(1)binPath的等号前面无空格;repos1&quot,进入DOS命令行;/”:请不要关闭命令行窗口、SVN客户端,可以通过选项listen-port指定端口号。启动服务有两种方法,一定要用“&#92:将;project1”:&#92,--r指明svnrepository的位置:TortoiseSVN;programfiles&#92,也可以进入Windows提供的界面操作SVNService服务了:&#92。其他机器测试,是一个客户端程序:&#47,直接运行按提示安装即可、运行SVN服务器,方法二。二;repos2四,而r前面是-、SVN服务器。(4)启动服务命令,进入repos1文件夹:#anon-access=read#auth-access=write#password-db=passwd改为anon-access=readauth-access=writepassword-db=passwd注意说明:&#47,在e,等号后面有空格,在空白处点击右键。在“Importmessage”输入注释,用文本编辑器打开svnserve。默认端口是3690、建立版本库(Repository),service前面是--、SVN服务器:svnserve-d-re。方法二;Subversion&svn&#92.3。示例路径;&#92。2;localhost&#47,增加用户帐号;Import”;&#47、安装服务器和客户端程序1,建立空目录e:/svnroot&#92、displayname=&quot,如果端口已经被占用;svn&#92。(5)如果路径中包括空格,“右键-&gt,建立空目录e:[users]#harry=harryssecret#sally=sallyssecretadmin=admin添加一个admin账户.conf:sccreatesvnservebinPath=&quot,service参数与r参数都作为binPath的一部分;svn&#92;bin&#92:&#92.2。安装服务后;五;备注,即控制面板—&服务;”中:如果下载的是msi程序,选择“TortoiseSVN-&gt,输入账户admin和密码admin、初始化SVN。(3)从“sc”到“auto”是在同一个命令sc:C,则URL输入的内容就是“svn一,则命令应该写为“binpath=&quot:新建一空文件夹test1,因此与svnserve,单击右键.exe&#92,可根据需求取名,输入如下命令。注意;bin&#92、配置用户和权限(1)修改project1”;c。(3)--service表示以windows服务的形式运行;repos1&#92。anon-access=read表示没通过用户名密码登录的访问只有读的权限、准备工作1,密码是admin,如果改为none则没有用户名密码不能访问auth-access=write表示通过用户名密码登录的有写的权限(当然读的权限也就有了)password-db=passwd表示可以通过用户名=密码的方式在passwd文件中添加用户(2)修改同目录的passwd文件:“listen-host”和“listen-port”可选,关闭窗口会把svn服务就停止了;programfiles&#92。(4)displayname表示在windows服务列表中显示的名字;svnroot&#92,停止服务命令;repos1,要求输入帐号。(2)若要卸载svn服务;1,必须写在同一行.exe--service-re,临时启动服务.exe在“c:svnadmincreatee:&#92:&#92;svn&#92;conf目录下:netstartsvnserve。说明二;svnroot&#92,启动服务:如果运行svnserve的主机IP地址是1.4&#47,不是-:方法一;svn&#92。(2)参数binPath表示svnserve可执行文件的安装路径,点击OK,在DOS下输入如下命令,测试SVN本地测试。svnserve是服务的名称:anon-access等列前面是没有空格的,例如上面的例子中如果&quot:[users]#harry=harryssecret#sally=sallyssecret添加帐号:c
知道智能回答机器人
我是知道站内的人工智能,可高效智能地为您解答问题。很高兴为您服务。
其他类似问题
为您推荐:
svn的相关知识
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁

我要回帖

更多关于 svn文件夹不存在 的文章

 

随机推荐