Unable to find hgrc file [duplicate] - mercurial

This question already has answers here:
How to save username and password with Mercurial?
(8 answers)
Closed 8 years ago.
I am trying to set up my username and password for mercurial. The answers to previous questions says to add the following lines in the .hgrc file
[ui]
username = MY_USER_NAME
password = MY_PASSWORD
However I am unable to find this file, I only see .hg file in my main directory.

On my windows machine I have a mercurial.ini file in c:\users\my_user_name
On my mac, I have a .hgrc file in my home directory.

Related

Git: Host Key Verification Failed [duplicate]

This question already has answers here:
Git error: "Host Key Verification Failed" when connecting to remote repository
(30 answers)
Closed 1 year ago.
I am Trying to make a commit to my repository but when i click on Publish Branch then an error occurs please help me guys I need help with office work and I am new.
Click Here to check the Image
There are two solutions for this:
Switch the remote URL to use HTTPS instead of SSH (you should not have any authentication issues as long as you are logged in with your GitHub account in GitHub Desktop).
Get SSH working. The host key verification failed error means that the host key from GitHub Enterprise isn't in your known_hosts file. You should be able to fix this by running the following command from Git Bash:
ssh-keyscan -H <GitHub_URL> >> ~/.ssh/known_hosts

MySQL database file on Mac OS [duplicate]

This question already has answers here:
MySQL data directory location
(9 answers)
Closed 7 years ago.
A really dumb question. I have used MySQL workbench created a new database/schema (on the same local Mac OS box), and wondering what are path of the database physical folder, which it stores data/index files?
BTW, I did search by database name, but cannot find anything. :(
thanks in advance,
Lin
Ok, either issue a show variables where variable_name='datadir'; then follow up with scrutiny of folders underneath it. Folders are the schema/db folders.
Or look at the answer Here on the Stack pointing one to examining the /etc/my.cnf file that may contain:
[mysqld]
datadir=/var/lib/mysql
on my Windows box they would appear as
C:\ProgramData\MySQL\MySQL Server 5.6\data>dir /ad
Directory of C:\ProgramData\MySQL\MySQL Server 5.6\data
09/13/2015 01:36 PM <DIR> ajax_stuff
07/14/2015 09:52 PM <DIR> mysql
...
11/11/2015 10:37 PM <DIR> so_gibberish
09/21/2015 01:10 PM <DIR> real_secret_stuff
Sorry, not on my mac at the moment

Webstorm: Cannot Resolve Directory Part 2 [duplicate]

This question already has answers here:
Webstorm: "Cannot Resolve Directory"
(5 answers)
Closed 4 years ago.
I'm having problems rendering pictures from my internal directories for a Meteor project using the PHPStrom IDE. It keeps giving me the "cannot resolve directory" error as seen here:
Webstorm: "Cannot Resolve Directory"
The answer therein should help me however it does not reference where to find settings or which settings he's refering to (Mac, Webstorm, Something else?). I have a Mac (I'm new to it and bought an old 2009 off Craigslist recently just so I could use Meteor; I'm learning Mac as I go and it is a strange strange world for a PC user).
I control & clicked on the top folder in PHPStorm. I then went to "Mark Directory As" and selected Mark as Resource Root which fixed the problem for all sub folders.

MySQL: Source Error 2? No File Found [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 2 years ago.
Improve this question
When I tried to source for a particular .sql file, namely 'registrar.sql', the following error is displayed:
Failed to open file 'registrar.sql', error: 2
I know that this means the below error:
#define ENOENT 2 /* No such file or directory */
However, I am not sure how to be more specific as I have tried entering 'source registrar.sql' and I have tried entering the absolute path. Now it is possible I am just entering the absolute path incorrect which is where I could use some help. Here is the path in properties in windows.
C:\Program Files\MySQL\MySQL Server 5.1\bin
File name is: registrar.sql
Any help on this would be appreciated.
Try like this:
mysql> source c:/dumps/mydatabase.sql
That is, use forward slash instead of back slash
You need to restart mysql if you have copied file after starting mysql server.
also if you have space in file or folder name you should use quotes.
I think that the sql process might not have read access to your directory anyway. In which case, you might have to copy the sql file to other accessible folder and tell mysql the absolute path.
Remove spaces in the folder names of the path, It worked for my mac path.
(Eg: change the folder name MySQL Server 5.1 to MySQLServer5.1)

Mercurial error: abort no username supplied

Problem on WindowsXP (likely will happen on all Win installs), first time using Mercurial. I found the answer in an inobvious place so I'm asking/answering the question myself so others don't have to search like I did.
First time using Mercurial on machine.
Add new repoz:
c:\bla\>hg add
no problem.
Next, commit:
c:\bla\hg commit
error:
abort: no username supplied (see "hg help config")
Solution:
On my Windows install, the Mercurial.ini did not get propagated. It also needs a user email added to it.
Take the default Mercurial.ini file found at in the Mercurial executable install directory (C:\Program Files\Mercurial\Mercurial.ini on my machine)
and copy it to your user home dir (C:\Documents and Settings\myName on winXP).
On a Windows 7 install there is no default .ini, you will need to create a new one in C:\Users\myName.
Then edit that .ini file. Find this area. The username needs an email set. It will be blank--add your email name here.
[ui]
; editor used to enter commit logs, etc. Most text editors will work.
editor = notepad
username = userEmail#domain.example
This fixed the problem for me.
I'm sorry, but why do you call this a problem? Mercurial asks you to see hg help config, and this help text explicitly tells you how to add a username -- I know since I wrote that help text :-)
How should we improve the error message to make this more clear?
However, we've managed to screw this up by making hg help config include help for all config settings. So the nice little example of how to set the username:
[ui]
username = Your Name <your#email.example>
is now lost in the noise (add this to ~/.hgrc, creating the file if necessary). I've opened an issue for this.
On Windows XP I do not see an ini file.
After creating the repository using the command hg init,
I added a file with the name hgrc to the folder .hg
With the following content:
[ui]
editor = notepad
username = zamboni#icemachine.example
no matter Windows or Linux, hg looks the <repo>/.hg/hgrc file for valid configuration. As in "hg help config" says, you only have to add at the end of that file the following lines:
[ui]
username = YOUR NAME <EMAIL#HOST.EXAMPLE>
verbose = true
save and hg commit -m 'test'
If you are using TortoiseHg, you can add [UI] settings easily
Right clicking in any folder Explorer to access the TortoiseHg menu.
From the flyout TortoiseHg menu choose Global Settings
From the interface click the Edit File
Add the [UI] settings to the end
[ui]
username = YourName <YourEmail#SomeAddress.com>
verbose = true
Save and you are done
Here is what worked like a charm for me on Windows XP:
Go to the folder C:\Program Files\Mercurial\hgrc.d assuming you have installed Mercurial to C:\Program Files\Mercurial\.
You should see a Mercurial.RC file in there.
Copy the file to C:\Documents and Settings\ [USERNAME]\
Rename Mercurial.RC to Mercurial.ini.
Edit the [ui] section like so:
[ui]
; editor used to enter commit logs, etc. Most text editors will work.
editor = notepad
verbose = True
username = userEmail#domain.example
I had the same problem. What helped me was to put [ui] and username = firstname lastname on separate lines of the ~/.hgrc file. Putting these two things on one line did not work and led to the error.
This problem still exists. The mercurial.ini file is ignored no matter where you put it.
No mercurial.ini file is created during installation. I created one in the Mercurial install directory, but it had no effect. I copied it to %USERPROFILE% and then to %HOME%, but neither one works.
Putting .hgrc in the HOME directory works.
The documentation ("hg help config") needs to be fixed.
Configure you .hgrc like this:
[ui]
username = your name <youremail#host.example>
verbose = True
NOTE! Do not leave out the [ui] part
This is a problem because in the help file the path to the specified config file does not exist, we have to copy the Mercurial.ini from program files directory to USER directory, maybe this is a problem coming from the installer on windows.
#Kevin Won: you forgot to add the line:
verbose = True