How to list files in SourceGear Vault - version-control

How can I generate a report that represents all the files in a hierarchical manner using SourceGear Vault?
I know VSS and TFS have this functionality, and I am hoping that Vault does as well.

You should be able to use the command line:
vault LISTFOLDER top_of_your_repository > status_report.txt
From the command line helps:
LISTFOLDER usage: vault.exe LISTFOLDER [options] repositoryfolder
LISTFOLDER will display the contents of the folder specified by
repositoryfolder, including the status of any working folders.
Server and authentication information is specified by:
-host host Hostname of the server to connect to. Can also use "-server".
-ssl Enables SSL for server connection.
-user username Username to use when connecting to server.
-password password Password to use when connecting to server.
-repository repositoryname Repository to connect to. This is a list of possible options:
-norecursive Do not act recursively on folders.

Related

How do I use SFTP without SSH?

I want a fast and flexible file server but I don't need encryption or authentication. How can I use SFTP for this on Linux systems?
SFTP happens to be used by SSH servers but it's a well-developed protocol that works well on its own. The sftp-server developed by OpenSSH has no dependency on an SSH server; sftp-server uses standard input/output. (Other SFTP servers are similar.)
It is trivial to share a filesystem via SFTP, similar to what you might do with NFS but without the need for root access. I'll use socat as the daemon for this ad-hoc example, but xinetd would make a more permanent solution. The location of sftp-server is from my Ubuntu installation of the openssh-sftp-server package.
On the server:
$ mkdir shared_to_the_world
$ cd shared_to_the_world
$ socat tcp-listen:1234,reuseaddr,fork exec:/usr/lib/openssh/sftp-server
On the client:
$ mkdir /tmp/sftp_test
$ sshfs -o reconnect,ssh_command="nc my_sftp_server_address 1234 --" : /tmp/sftp_test
$ cd /tmp/sftp_test
Now your client (and anyone else's!) can seamlessly work with the files in the shared directory on the server. Both read and write are enabled, so be careful.
Consider using socat listen's "bind" and "range" options to limit the access to your server.
You can’t use SFTP without SSH. Take a look at : https://www.ssh.com/ssh/sftp/ (emphasis mine) :
“ SFTP (SSH File Transfer Protocol) is a secure file transfer protocol. It runs over the SSH protocol.. It supports the full security and authentication functionality of SSH.
...
SFTP port number is the SSH port 22 ... It is basically just an SSH server. Only once the user has logged in to the server using SSH can the SFTP protocol be initiated. There is no separate SFTP port exposed on servers. “

psftp says "The server's host key is not cached in the registry"

I'm getting the following message when trying to connect to an SFTP server from PowerShell using psftp:
Error:
psftp.exe : The server's host key is not cached in the registry. You have no guarantee that the server is the computer you think it is.
The server's rsa2 key fingerprint is:ssh-rsa 2048 41289438190410491
Connection abandoned.
PowerShell script:
$Username = "Username"
$Password = "Password"
psftp.exe sftpserver -l $Username -pw $Password -batch -bc -b C:\batch\download.bat
(psftp.exe is stored in c:\windows\system32)
I've SSH into this server from this server before via PuTTY and WinSCP without issue. However, it won't connect when running via PowerShell.
That message is not an error.
Every SSH/SFTP client needs to verify a host key of a server.
Even PuTTY and WinSCP asked you for sure on your first connection to the server to verify a host key.
Though PuTTY and psftp share a host key cache. Are you sure you used PuTTY on the same machine with the same local Windows account?
Anyway, either:
Run psftp once without the -batch switch. Check the host key and confirm if you trust it. psftp will cache the host key and will work from now on.
Or add -hostkey switch with a fingerprint of trusted hostkey to your psftp command in PowerShell script.
See also Respond y(es) to psftp host key prompt (though the highest-scored answer by #vmitchell85 is wrong, see the answer by #GerriePretorius).

Can't connect to my server with restric RSYNC (RRSYNC)

I explain my problem:
I used backuppc for remote some database on an other server and for saving my data I used rsync which uses ssh. On my remote server I put the ssh key of backuppc and it worked.
But I wanted to secure this connexion, so I used rrsync (a perl script for restrict the access), for a "read-only" access with copy.
So now, in the remote server I have in root/ssh/authorized_keys
command="/usr/local/bin/rrsync -ro /" ssh-rsa
But when I try to connect I have this message:
/usr/local/bin/rrsync: Not invoked via sshd
It's a message from the perl script, but I don't know what it means or what can I do for this to work.
As far as I can tell, this message appears when you try to access the server with the restricted key without using rsync. It may be possible to edit the script to allow other programs, but I'm not skilled enough to attempt that.

Private Github Repositories with Envoy

Anybody has any problems deploying with Laravel's envoy when using private Github repos?
When manually cloning my repo from the production server, the ssh key seems to be accessible but when using Envoy, I always get a "Permission denied (publickey) error.
Thanks
It is probably because the ssh key on your remote server requires a password.
If you change the Envoy.blade.php to perform some other task you should be able to establish whether you are connecting to your remote correctly.
#servers(['web' => 'user#domain.com'])
#task('deploy')
cd /path/to/site
git status
#endtask
Should return something like:
[user#domain.com]: On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working directory clean
If you are connecting using a Mac or Linux you probably don't have to enter your password because your terminal is using ssh-agent which silently handles your authentication.
Wikipedia article on ssh-agent
When connecting over ssh, ssh-agent isn't running and the script is being prompted for a password which is where it is failing.
To get around this you could to generate a new key on the remote machine that doesn't use a password.
If you want to restrict the ssh key to a single repository on GitHub have a look at deploy keys
You need to pass the -A (as per the man page it - Enables forwarding of the authentication agent connection. This can also be specified on a per-host basis in a configuration file) in you ssh string.
You will also need add your ssh key for agent forwarding (on the machine which can access the git remote which I assume be your localhost)
ssh-add -K ~/.ssh/your_private_key
Something like this
#servers(['web' => '-A user#domain.com'])
#task('deploy')
cd /path/to/site
git status
#endtask
Git remote commands should now work.

How do I specify the key file that capistrano will use when cloning the repository on the remote server?

Ideally, I want something like set :scm_keyfile, "~/.ssh/server-deploy-key". The path specified would of course be a path on the remote server.
If the remote user already has a ~/.ssh/id_rsa or ~/.ssh/id_dsa then git will use it by default.
If you wish to use an alternate file name for your private key, you can do this. Create a file on your remote server ~/.ssh/config and put these lines in it
Host github.com
User git
IdentityFile ~/.ssh/server-deploy-key
Now when you attempt to run a command like git clone git#github.com/xxx/yyy.git, Your ~/.ssh/server-deploy-key will be used.
Another method is to use ssh-agent forwarding. In this method, you don't need to put your deploy key on the remote server. As long as it is on your local machine, and you have enabled ssh-agent forwarding, your remote server will have access to the key and will use it . There is a nice article on github explaining this.