Can someone pls advise why I'm getting NO CHANGES found at the end.
Also, I'm getting an annoying message, "Username not specified in .hg/hgrc. Keyring will not be used."
Version tool: Hg latest version
Server: Linux
Workspace: ~/2012WS
LinuxServer123:~/2012WS # hg clone http://LinuxServer123/hg/GigaTest/
Username not specified in .hg/hgrc. Keyring will not be used.
http authorization required
realm: Mercurial Repositories
user: u123456
password:
destination directory: GigaTest
requesting all changes
adding changesets
adding manifests
adding file changes
added 14 changesets with 585 changes to 575 files (+1 heads)
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
updating to branch default
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
LinuxServer123:~/2012WS #
LinuxServer123:~/2012WS # cd GigaTest/
LinuxServer123:~/2012WS/GigaTest # ls -tlr
total 12
-rw-r--r-- 1 root root 25 Jan 10 16:36 hello.py
-rw-r--r-- 1 root root 25 Jan 10 16:36 HELLO-UP.PY
drwxr-xr-x 4 root root 4096 Jan 10 16:36 .hg
LinuxServer123:~/2012WS/GigaTest # vi hello.py
LinuxServer123:~/2012WS/GigaTest # ls -l > new.txt
LinuxServer123:~/2012WS/GigaTest # hg add new.txt
LinuxServer123:~/2012WS/GigaTest #
LinuxServer123:~/2012WS/GigaTest #
LinuxServer123:~/2012WS/GigaTest # hg stat
M hello.py
A new.txt
LinuxServer123:~/2012WS/GigaTest #
LinuxServer123:~/2012WS/GigaTest # hg out
comparing with http://LinuxServer123/hg/GigaTest/
Username not specified in .hg/hgrc. Keyring will not be used.
http authorization required
realm: Mercurial Repositories
user: u123456
password:
searching for changes
no changes found
LinuxServer123:~/2012WS/GigaTest #
Thanks in advance.
You have to do hg commit first.
hg stat shows the changes made to the current working repository (since the last commit) and hg out shows the commits made to your repository that will be pushed out on hg push.
And the message "Username not specified in .hg/hgrc" means that your username is not specified in the .hg/hgrc file. Keyring is an extension I'm not familiar with; presumably it will take your username and do something with a key.
Related
I'm hoping someone could help with this:
I have a user: jenkins-user with a umask 0002 so that files are created with 664 as shown
touch 1.txt
-rw-rw-r--. 1 jenkins-user admin 0 Oct 14 12:04 1.txt
However, when the jenkins-user runs [from within jenkins] and does a
git pull
as part of a build, created files are with different permissions 644 [as shown]
-rw-r--r-- 1 jenkins-user admin 318 Oct 14 12:18 2.txt
and the build log also indicates ... create mode 100644 .....
I understand that git does not interfere with set permissions and only knows whether or not a file is executable, so I am not sure what is messing with the expected permissions, and more importantly, how to rectify this. Thanks for your help with this.
Set
git config core.sharedRepository 0660
at the server repo. See the docs.
https://piazza-resources.s3.amazonaws.com/j6zdjr2o14g248/j7hl17d3fku6te/lab1.pdf?AWSAccessKeyId=AKIAIEDNRLJ4AZKBW6HA&Expires=1505775332&Signature=0n1JbqGf5F%2BRtA%2FFmqEgQcdi6iQ%3D
I don't know how to "4. Commit this new file to your repository" (step 3 part 4)
Below is everything I did up to step 3 part 4
>>> cd /cmshome/myutorid/cscb07f17_space
>>> mkdir ./lab1
>>> cd lab1
>>> mkdir ./.myrepo
>>> svnadmin create ./.myrepo
>>> pwd
/cmshome/myutorid/cscb07f17_space/lab1
>>> mkdir ./myCode1
>>> svn co file:///cmshome/myutorid/cscb07f17_space/lab1/.myrepo myCode1
Checked out revision 0.
>>> cd myCode1
>>> ls -al
total 0
drwx------ 1 myutorid cmsusers 76 Sep 18 16:01 .
drwx------ 1 myutorid cmsusers 104 Sep 18 16:00 ..
drwx------ 1 myutorid cmsusers 204 Sep 18 16:01 .svn
>>> ls -a
. .. .svn
>>> touch A.txt
>>> pico A.txt
Use "fg" to return to nano.
[1]+ Stopped pico A.txt
Could someone tell me how to commit A.txt into the repository? Does it matter what directory im stationed in?
You will need to place the file under revision control, for example:
svn add A.txt
Then you commit changes to the repository using commit, for example:
svn commit A.txt
The examples above are executed in the same directory as the file, but svn will deduce the location of the repository as long as commands are executed within the working copy (anywhere within myCode1).
The commit command requires an editor to be configured, alternatively you will need to use the -m option to provide a commit message.
By the way, [1]+ Stopped pico A.txt means pico is still running and the file has not necessarily been saved and closed. Is that what you intended?
See the online version of the manual for more.
i create backup folder in ftp server , and send all my .tar.gz file into /backup folder
using (put file.tar.gz backup)
while i retrieve backup,, i get backup folder as backup files. ,, how to convert the file to folder ..
ftp server
ls
227 Entering Passive Mode (10,21,131,105,76,56)
150 Accepted data connection
drwxr-xr-x 6 100 ftpgroup 7 Oct 20 19:57 .
drwxr-xr-x 6 100 ftpgroup 7 Oct 20 19:57 ..
-r-------- 1 100 ftpgroup 84 Oct 21 11:15 .banner
drwxrwxrwx 3 100 ftpgroup 4 Oct 20 18:28 backup
drwxrwxrwx 2 100 ftpgroup 3 Oct 20 19:45 dailybackup
drwxrwxr-x 2 100 ftpgroup 3 Oct 20 19:57 hi5songs
drwxrwxr-x 2 100 ftpgroup 3 Oct 20 19:49 whole
226-Options: -a -l
226 7 matches total
i tried :
ftp> mget backup``
mget .? y
227 Entering Passive Mode (10,21,131,105,62,8)
550 I can only retrieve regular files
mget ..? y
Warning: embedded .. in .. (changing to !!)
227 Entering Passive Mode (10,21,131,105,46,39)
550 Can't open !!: No such file or directory
mget backup? y
227 Entering Passive Mode (10,21,131,105,72,24)
550 I can only retrieve regular files
mget cpanelbackup? y
227 Entering Passive Mode (10,21,131,105,73,69)
550 Can't open cpanelbackup: No such file or directory
while
i use (get backup home)
it successfully retrieve but as files shown below
server:
'root#azar [/home]# ls
./ backup.2* .cpan/ dailybackup hi5songs.4 oldeserver
../ backup.3* cPanelInstall/ hi5songs/ hi5songs.5 oldserver/
0_README_BEFORE_DELETING_VIRTFS backup.4* .cpanm/ hi5songs.1 home quota.user
backup/ backup.5* .cpcpan/ hi5songs.2 latest virtfs/
backup.1* .banner cpeasyapache/ hi5songs.3 lost+found/ whole'
i got that backup with green color executable file like backup.1* ( note: i cant open those file and extract those files) what to do
how to get my .tar.gz file back
please guide me,,
advance thanks,,
Updated Answer
If you want to get all files from /some/place on your server, to /home/here on your local machine, you would either do this:
cd /home/here # change directory before starting FTP
ftp server ... # connect
cd /some/place # go to desired folder on server
bi # ensure no funny business with line-endings
mget * # get all files
or you can change directory locally, within FTP like this:
ftp server ... # connect
cd /some/place # go to desired folder on server
lcd /home/here # LOCALLY change directory to where you want the files to 'land'
bi # ensure no funny business
mget * # get all files
Original Answer
I cannot understand your question at all, but you are doing some things wrong.
You cannot use GET or MGET to get a folder (directory) like you are trying to do with mget backup. You can only GET a file. Now your file may be a tar-file with more than one file in it, but it is still a file.
If you are getting tar-files and binary files, you should use BINARY mode to ensure line-end characters that may occur in binary files are not translated between Windows and Unix line-endings. So, as a matter of course, you should issue BI command before you get files.
If you have several files in your backup directory, you should probably do cd backup then bi
then mget *
Solution: Finally realized the problem. Stupid User Error. Forgot to run 'git init' in the new project directory first. Hence, running 'git add .', 'git remote add origin repo.git' (or even the typo 'git add origin repo.git') in a directory without a git repo, will revert to applying the command globally, hence all the parent and other directories in the git status results.
I've been using a git for a while and never hit this problem, not sure what's going on. In a nutshell, using 'git remote add origin git#github.com...' creates a global remote across my entire filesystem, instead of a local one inside the current directory only. It even overwrites the remotes in other lateral directories.
The code is worth a thousand words, anyone know what's going on here:
prompt:~/bin/Projects$ ls -al
total 56
drwxr-xr-x 15 kurtosis kurtosis 4096 2011-09-09 21:35 .
drwxr-xr-x 26 kurtosis kurtosis 4096 2011-09-09 21:35 ..
drwxr-xr-x 5 kurtosis kurtosis 4096 2011-06-16 13:42 byrongibson.com
drwxr-xr-x 5 kurtosis kurtosis 4096 2011-06-16 13:44 byrongibson.github.com
drwxr-xr-x 3 kurtosis kurtosis 4096 2011-09-09 21:33 know.io
drwxr-xr-x 3 kurtosis kurtosis 4096 2011-06-16 13:45 problem-sets
drwxr-xr-x 2 kurtosis kurtosis 4096 2011-07-18 20:11 vim~
prompt:~/bin/Projects$ git remote -v
prompt:~/bin/Projects$ cd know.io/
prompt:~/bin/Projects/know.io$ ls -al
total 16
drwxr-xr-x 3 kurtosis kurtosis 4096 2011-09-09 21:33 .
drwxr-xr-x 15 kurtosis kurtosis 4096 2011-09-09 21:35 ..
-rw-r--r-- 1 kurtosis kurtosis 7 2011-09-09 21:27 README.md
drwxr-xr-x 2 kurtosis kurtosis 4096 2011-09-09 21:27 vim~
prompt:~/bin/Projects/know.io$ git remote -v
prompt:~/bin/Projects/know.io$ git remote add origin git#github.com:byrongibson/know.io.git
prompt:~/bin/Projects/know.io$ git remote -v
origin git#github.com:byrongibson/know.io.git (fetch)
origin git#github.com:byrongibson/know.io.git (push)
prompt:~/bin/Projects/know.io$ cd ..
prompt:~/bin/Projects$ git remote -v
origin git#github.com:byrongibson/know.io.git (fetch)
origin git#github.com:byrongibson/know.io.git (push)
prompt:~/bin/Projects$ cd ~
prompt:~$ git remote -v
origin git#github.com:byrongibson/know.io.git (fetch)
origin git#github.com:byrongibson/know.io.git (push)
prompt:~$ cd bin/Github
prompt:~/bin/Github$ git remote -v
origin git#github.com:byrongibson/know.io.git (fetch)
origin git#github.com:byrongibson/know.io.git (push)
prompt:~/bin/Github$
Update1: This problem mysteriously went away. No idea what I did or why. If I figure it out, will update with answer.
Update2: I did it again with another repository. This time I think it was because, when I was setting up the repository and adding the remote origin, I made a typo and did this:
> git add origin git#github.com/.../repo.git
E.g., I forgot 'remote'. That set the global origin in ~/.git/config to:
[remote "origin"]
url = git#github.com/.../repo.git
fetch = +refs/heads/*:refs/remotes/origin/*
Deleting that from config removes the global origin, but unfortunately when I cd back into my new repo and use 'git add .', it not only adds every file and directory in my repo, but apparently everything outside my repo that's not in my global .gitignore as well:
prompt:~/bin/Projects/Haskell/Courses/Stanford$ git remote -v
prompt:>~/bin/Projects/Haskell/Courses/Stanford$ git remote add origin git#github.com:byrongibson/stanford-fall2011-cs240h.git
prompt:>~/bin/Projects/Haskell/Courses/Stanford$ git remote -v
origin git#github.com:byrongibson/stanford-fall2011-cs240h.git (fetch)
origin git#github.com:byrongibson/stanford-fall2011-cs240h.git (push)
prompt:>~/bin/Projects/Haskell/Courses/Stanford$ git add .
prompt:>~/bin/Projects/Haskell/Courses/Stanford$ ls -al
total 12
drwxr-xr-x 3 byron byron 4096 2011-09-26 18:19 ./
drwxr-xr-x 3 byron byron 4096 2011-09-26 18:19 ../
drwxr-xr-x 2 byron byron 4096 2011-09-26 18:09 Lectures/
prompt:>~/bin/Projects/Haskell/Courses/Stanford$ git status
# On branch master
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# new file: Lectures/basics1-slides.html
# new file: Lectures/basics1.html
# new file: Lectures/basics1.md
# new file: ../../../../btccx/btc.cx/README
# new file: ../../../../btccx/btc.cx/README.md
#
# Changed but not updated:
# (use "git add/rm <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: ../../../../../.gitconfig
# modified: ../../../../../.profile
# modified: ../../../../../Downloads/Keys/chromiumppa_key.html
# modified: ../../../../../Downloads/Keys/chromiumppa_key.pub
# modified: ../../../../../Downloads/Keys/linux_signing_key.pub
# modified: ../../../../../Downloads/Keys/tor-key-install.sh
# deleted: ../../../../btccx/btc.cx/README
# deleted: ../../../../btccx/btc.cx/README.md
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# ../../../../../.FBReader/
# ../../../../../.ICEauthority
# ../../../../../.Skype/
# ../../../../../.SpiderOak/
.
.
.
# ../../../../../Downloads/xmonad-ubuntu.html
# ../../../../../Downloads/xmonad-ubuntu_files/
# ../../../../../Dropbox/
# ../../../../../Music/
# ../../../../../Pictures/
# ../../../../../SpiderOak/
# ../../../../../Ubuntu One/
# ../../../../../Videos/
# ../../../../Archive/
# ../../../../Clients/
# ../../../../CryptoCurrency/
# ../../../../Databases/
# ../../../../Git/
# ../../../../Go/
# ../../../../Google/
# ../../../../Hosts/
# ../../../99-scala-problems/
# ../../LYaH/
# ../../RWH/
You would normally get the following error if you run git remote -v outside a git repository:
$ git remote -v
fatal: Not a git repository (or any of the parent directories): .git
I would guess that what's happened is that you accidentally ran git init in your home directory at some point, which would explain what you're seeing. If you run:
git rev-parse --show-toplevel
That should show you the top level of the git repository you are actually in.
Solution: Just to clarify above explanation: I forgot to run 'git init' in the new project directory first. Hence, running 'git add .', 'git remote add origin repo.git' (or even the typo 'git add origin repo.git') in a directory without a git repo, will revert to applying the command globally, hence all the parent and other directories in the git status results.
Running 'git init', then 'git remote add origin repo.git' fixes everything above.
So as of two days ago, i had myself a shiny new SVN server. I set it up for WebDAV with no problems. It wasn't until i tried to host multiple projects that i ran into trouble.
At first, i had all of the project folders in one repository. But then i saw the error in my ways, and switched to multiple repositories. Rather than edit the /etc/apache2/sites-available/default file with every new project, i elected to use the svnserve deamon.
So, the problem is, i cn only make commits from Eclipse when the daemon is run as root. If not, I get a Permission Denied Error. Any ideas? Here are the directory stats:
drwxr-xr-x 6 root root 4096 2011-06-07 09:38 .
drwxr-xr-x 4 root root 4096 2011-06-05 00:48 ..
lrwxrwxrwx 1 svn svn 6 2011-06-06 22:35 all -> repos/
drw-rw-r-- 6 svn svn 4096 2011-06-06 13:53 EmpowerView
drw-rw-r-- 6 svn svn 4096 2011-06-06 13:54 GoogleVoicemail
-rw-rw-r-- 2 svn svn 307 2011-06-07 08:47 passwd
drw-rw-r-- 6 svn svn 4096 2011-06-06 13:54 PerlinNoise
drw-rw-r-- 7 svn svn 4096 2011-06-05 02:15 repos
-rw-rw-r-- 3 svn svn 2278 2011-06-07 08:46 svnserve.conf
EDIT
I tried the suggested re-checkout with the daemon not running as root, and still no cigar. Same permission error.
EDIT 2
I also tried running the daemon as the user svn, but no such luck. At one point I screwed up my primary group and no longer had sudo privileges! I had to hack into my own server through a buddy's account
EDIT 3 ANSWER
Well, after a few hours of tinkering, here is the setup that i got to work.
First I deleted any existing checkouts, and killed the deamon.
Then I set all the permissions to 774 for all my repositories (see below)
Next, I ran the daemon with this command sudo -u svn -- svnserve -d -r /storage/svn/
This allowed me to run the deamon as the user 'svn' without entering a password. (svn has no password or shell for security reasons)
Finally, I double checked all my config files, and was able to do checkouts exactly as hoped.
Repositories Directory
drwxr-xr-x 6 root root 4096 2011-06-07 10:34 .
drwxr-xr-x 4 root root 4096 2011-06-05 00:48 ..
lrwxrwxrwx 1 svn svn 6 2011-06-06 22:35 all -> repos/
drwxrwxr-- 6 svn svn 4096 2011-06-06 13:53 EmpowerView
drwxrwxr-- 6 svn svn 4096 2011-06-06 13:54 GoogleVoicemail
-rwxrwxr-- 2 svn svn 307 2011-06-07 08:47 passwd
drwxrwxr-- 6 svn svn 4096 2011-06-06 13:54 PerlinNoise
drwxrwxr-- 7 svn svn 4096 2011-06-05 02:15 repos
-rwxrwxr-- 3 svn svn 2273 2011-06-07 09:50 svnserve.conf
(Note: All of my repositories share common editors and permissions, so in each repositories conf/ folder, i put hardlinks to the passwd and svnserve.conf files above)
Probably the svn daemon has read permission to your repository but not write permission.
First find out under what user the svn daemon runs. Then chown the full repository to that user. That way the daemon can write your commits also.
Weird things happen when you commit, or checkout as root. Try to checkout a given repository not as root, and if that works you should be able to commit to it as a regular user thereafter.
If that still doesn't work, check the permissions on the repository itself. It's possible that the permissions aren't set in order to allow non-root users commit access.